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

Remove space-in-path replacement #896

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

Conversation

brentleyjones
Copy link
Collaborator

This replacement causes issues with importing indexstores.

In 965c373 this replacement was added to work around issues with ar_wrapper. I don't see ar_wrapper used anywhere in Bazel, so I believe this is safe to remove.

@brentleyjones
Copy link
Collaborator Author

brentleyjones commented Sep 6, 2022

Seems I'll need to find a way to escape some paths in tool invocations, and if not possible give up ☹️. Though it looks like it works in Bazel 6.0, so it might be something that we can only merge once we drop 5.x support.

@brentleyjones brentleyjones marked this pull request as draft September 6, 2022 17:01
@thii
Copy link
Member

thii commented Sep 7, 2022

This replacement causes issues with importing indexstores.

What issues does it cause?

@brentleyjones
Copy link
Collaborator Author

Unit files have a hash based on the object file path. When we import unit files we need to make the object file path equal to what it would be if Xcode generates them. Xcode will generate these paths with spaces in their name, while rules_swift will replace the spaces.

So during an import we would have to undo this, but with index-import (which is just regex) we can't. Even if we could, theoretically there are some paths out there with __SPACE__ in their name.

@brentleyjones
Copy link
Collaborator Author

And after saying all of that, I think I'll add something to index-import to address this for the time being.

@brentleyjones
Copy link
Collaborator Author

MobileNativeFoundation/index-import#65

We can merge this PR once we drop Bazel 5.x support.

This replacement causes issues with importing indexstores.

In 965c373 this replacement was added to work around issues with `ar_wrapper`. I don't see `ar_wrapper` used anywhere in Bazel, so I believe this is safe to remove.
@brentleyjones brentleyjones force-pushed the bj/remove-space-in-path-replacement branch from a7a975a to 6755b56 Compare March 13, 2024 21:10
@brentleyjones brentleyjones marked this pull request as ready for review March 13, 2024 21:10
@brentleyjones
Copy link
Collaborator Author

Looks like there are new failures. I'll see if I'm able to address them.

@brentleyjones
Copy link
Collaborator Author

So clang (at least on linux) requires quotes for spaces in the params file. Seeing if I can influence that, or if it will require a Bazel patch.

@brentleyjones
Copy link
Collaborator Author

It looks like enabling the gcc_quoting_for_param_files feature should fix this, but I can't get it to change anything locally.

@brentleyjones
Copy link
Collaborator Author

bazelbuild/bazel#21699

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.

None yet

4 participants