Skip to content

Commit

Permalink
Use file_path instead of parsed_file_path for `bundle_info.archiv…
Browse files Browse the repository at this point in the history
…e` (#315)
  • Loading branch information
brentleyjones committed Apr 18, 2022
1 parent 7469c76 commit 71afa10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions test/internal/target/process_top_level_properties_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _process_top_level_properties_test_impl(ctx):
properties = process_top_level_properties(
target_name = ctx.attr.target_name,
files = [struct(short_path = p) for p in ctx.attr.files],
bundle_info = _bundle_info_struct(ctx.attr.bundle_info),
bundle_info = _bundle_info_stub(ctx.attr.bundle_info),
tree_artifact_enabled = ctx.attr.tree_artifact_enabled,
build_settings = build_settings,
)
Expand Down Expand Up @@ -92,11 +92,15 @@ def _bundle_info(
"product_type": product_type,
}

def _bundle_info_struct(dict):
def _bundle_info_stub(dict):
if not dict:
return None
return struct(
archive = struct(path = dict["archive.path"]),
archive = struct(
is_source = True,
owner = struct(workspace_name = None),
path = dict["archive.path"],
),
archive_root = dict["archive_root"],
bundle_id = dict["bundle_id"],
bundle_extension = dict["bundle_extension"],
Expand Down
2 changes: 1 addition & 1 deletion xcodeproj/internal/target.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _process_top_level_properties(
minimum_deployment_version = bundle_info.minimum_deployment_os_version

if tree_artifact_enabled:
bundle_path = parsed_file_path(bundle_info.archive.path)
bundle_path = file_path(bundle_info.archive)
else:
bundle_extension = bundle_info.bundle_extension
bundle = "{}{}".format(bundle_info.bundle_name, bundle_extension)
Expand Down

0 comments on commit 71afa10

Please sign in to comment.