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

Disable rules swift VFS overlay when rules_ios VFS overlay feature is enabled. #926

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gyfelton
Copy link
Contributor

@gyfelton gyfelton commented Oct 8, 2024

What changed?

Not enable vfsoverlay on rules_swift side if VFS overlay feature is enabled on rules_ios side

Why this change?

On our downstream project, We found that the way rules_swift writes the VFS overlay is not compatible with rules_ios. Specifically it has overlay-relative being true where rules_ios has it being false. In rules_ios we there calculate the number of ../ needed to associate a file to a right external-content path. In vfs overlay generated by rules_swift however, it has relative path to the root of bazel-out.
While I believe this works with bazel build (otherwise CI should have been red), this apparently does not work when building with rules_xcodeproj against a pure swift library. For unknown reason indexing will have unable to locate module Foo error without overriding the overlay-relative to be false and hardcode ../ in front to make it work.
Removing this makes rules_swift provide the real path to a swift module. And this makes xcode proj able to jump a swift module interface when cmd click on a swift module inside the source file.

Note that this is a broken change but downstream user can still enable swift.vfsoverlay on their side.

Next step:

go to rules_xcodeproj side and figure out if the integration tests with rules_ios is broken also. If so red green and try to find a way to guarantee it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant