Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass datamodels to AppleResourceInfo in _precompiled_apple_resource_bundle #746

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rules/precompiled_apple_resource_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ def _precompiled_apple_resource_bundle_impl(ctx):
return [
AppleResourceInfo(
unowned_resources = depset(),
datamodels = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it fair to say this change causes duplicating the data in the action graph or duplicating inputs somehow? Maybe we could move the xcdatamodel to be exclusively fed here or somehow mitigate copying it 2 times - that might cause an issue with upstream rules_apple but better to not have to copy files in general VS clone them

(output_bundle_dir.basename, None, depset([f]))
for resource_files in ctx.attr.resources
for f in resource_files.files.to_list()
if f.path.count("xcdatamodel")
],
owners = depset([
(output_bundle_dir.short_path, ctx.label),
(output_plist.short_path, ctx.label),
Expand Down
4 changes: 2 additions & 2 deletions rules/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def rules_ios_dependencies(
_maybe(
github_repo,
name = "build_bazel_rules_apple",
ref = "6f93e73382a01595d576247db9fa886769536605",
ref = "8210cec019da7dc8846c41bc643396559461e92d",
project = "bazelbuild",
repo = "rules_apple",
sha256 = "1618fc82e556ebc97ea360b8cacd3365ca3b0e0a85ccb32422468204843e752d",
sha256 = "de27679657f48ce9c264bc8bba30205a1a5705293e7f3aac3a34364e2b43da2f",
)
else:
_maybe(
Expand Down
Loading