@@ -260,7 +260,8 @@ def _make_skipped_target_xcodeprojinfo(
260260 rule_attr ,
261261 skip_type ,
262262 test_env ,
263- transitive_infos ):
263+ transitive_infos ,
264+ var_attr ):
264265 """Passes through existing target info fields, not collecting new ones.
265266
266267 Merges `XcodeProjInfo`s for the dependencies of the current target, and
@@ -275,6 +276,7 @@ def _make_skipped_target_xcodeprojinfo(
275276 test_env: `ctx.configuration.test_env`.
276277 transitive_infos: A `list` of `depset`s of `XcodeProjInfo`s from the
277278 transitive dependencies of the target.
279+ var_attr: `ctx.rule.var` (or `ctx.var` for Bazel 8 and below).
278280
279281 Returns:
280282 The return value of `_target_info_fields`, with values merged from
@@ -367,7 +369,7 @@ def _make_skipped_target_xcodeprojinfo(
367369
368370 info_env = getattr (rule_attr , automatic_target_info .env , {})
369371 info_env = {
370- k : ctx .expand_make_variables ("env" , v , {} )
372+ k : ctx .expand_make_variables ("env" , v , var_attr )
371373 for k , v in info_env .items ()
372374 }
373375 env = dicts .add (info_env , test_env )
@@ -756,7 +758,8 @@ def _make_xcodeprojinfo(
756758 rule_attr ,
757759 rule_kind ,
758760 target ,
759- transitive_infos ):
761+ transitive_infos ,
762+ var_attr ):
760763 """Creates an `XcodeProjInfo` for the given target.
761764
762765 Args:
@@ -767,6 +770,7 @@ def _make_xcodeprojinfo(
767770 target: The `Target` to process.
768771 transitive_infos: A `list` of `XcodeProjInfo`s from the transitive
769772 dependencies of `target`.
773+ var_attr: `ctx.rule.var` (or `ctx.var` for Bazel 8 and below).
770774
771775 Returns:
772776 An `XcodeProjInfo` populated with information from `target` and
@@ -799,6 +803,7 @@ def _make_xcodeprojinfo(
799803 skip_type = target_skip_type ,
800804 test_env = ctx .configuration .test_env ,
801805 transitive_infos = transitive_infos ,
806+ var_attr = var_attr ,
802807 )
803808 else :
804809 info_fields = _make_non_skipped_target_xcodeprojinfo (
0 commit comments