bazel-ios / rules_ios

Bazel rules for building iOS applications and frameworks
Apache License 2.0
276 stars 84 forks source link

Update for rules_swift 2.x #879

Closed luispadron closed 1 month ago

luispadron commented 1 month ago

This fixes a missing _swift_vfs.yaml error related to the changes in: https://github.com/bazelbuild/rules_swift/pull/1191

Fixes #875

luispadron commented 1 month ago

When testing this we should ensure bazel clean --expunge is run because the vfs rule is not hermetic.

The current changes help get the missing vfs file added but then leads to:

error: cannot load underlying module <Module>
luispadron commented 1 month ago

Should be fixed now! @brentleyjones tested on their project.

@thiagohmcruz mind testing that this works for you as well in rules_swift 1.x and ideally also in 2.x? 🙏🏼

Going to test in cash soon

brentleyjones commented 1 month ago

Per Slack, this has BwtB issues still.

luispadron commented 1 month ago

I updated the extended_module_map rule to forward CcInfo with the generated files, hoping that fixes any BwtB issues (we don't use that feature yet so cant really test).

I did verify this builds for us using bazel clean --expunge && bazel build //... --disk_cache= --remote_cache= to ensure no left over build artifacts.

If CI goes green I'm going to merge to unblock using rules_swift 2.0 and we can follow up with any other improvements if we run into them.