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

Would be nice to be able te prefix the symlink created for external paths (/external) #150

Closed
chandlerc opened this issue Dec 19, 2023 · 2 comments

Comments

@chandlerc
Copy link

Currently the tool generates an /external symlink. It'd be nice to be able to customize the name, and for example by default prefix it with bazel- similar to other bazel-* symlinks.

@cpsauer
Copy link
Contributor

cpsauer commented Dec 20, 2023

Hey Chandler! Thanks for giving the tool a go--and for writing in.

Somewhat common request, but much harder to do than you might think, unfortunately. The external symlink's name is matching the one in Bazel's internal compilation environment (along with bazel-out, but they don't have a prefix for external). So changing the symlink name would require significant additional complexity in this tool, manually patching all possible flag variants for all toolchains (rather than (mostly) exporting the flags from Bazel as they actually are). Doable, probably, but I think not worth it. Could ask bazel if they'd change it? Willing also to take a PR, but it's gonna be tricky to get all the cases. (See past efforts.)

Saw your backlinked PR, btw. Definitely don't check in //external; the format varies on Windows. No need to add it or compile_commands.json to .gitignore if you don't want to; we automatically add to the hidden gitignore in .git/info/exclude. See _ensure_gitignore_entries_exist if you're curious.

Go Carbon! Happy coding :)
Chris

@chandlerc
Copy link
Author

I see, I didn't realize you were leveraging this to avoid editing the flags, but that makes sense. I guess leaving it as-is for now 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

No branches or pull requests

2 participants