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

Allow overriding tools/bazel path with BAZELISK_WRAPPER_DIRECTORY #567

Conversation

keith
Copy link
Member

@keith keith commented Apr 2, 2024

In some projects the tools/bazel path isn't practical. This allows users to override this path with the BAZELISK_WRAPPER_DIRECTORY env var / .bazeliskrc config option. This allows overriding the root
directory that the bazel wrapper executable should be found in. This was chosen over the file itself
in order to continue supporting recursive bazel invocations.

@luispadron
Copy link

+1 we'd love this primarily to fix #577

@keith
Copy link
Member Author

keith commented May 13, 2024

@fweikert ptal

@brentleyjones
Copy link

One downside with this is that scripts that recursively call into bazel might break now. They would work before because the tools directory is added to PATH. If this allowed specifying the parent directory of the wrapper, but the wrapper had to be called bazel, then that use case would continue to work.

@keith
Copy link
Member Author

keith commented May 13, 2024

yea i guess that's up to the user to manage if they rely on that. we could alternatively just allow a different directory vs different file name, since I imagine that's the more common thing that's important to override.

@luispadron
Copy link

I'd be happy with different directory if it helps with the issue Brentley mentioned

@brentleyjones
Copy link

It wouldn't entirely be in control of the user though, because the scripts I'm talking about are run targets, like rules_xcodeproj's project generation.

So I would prefer to limit it to the directory if possible.

In some projects the tools/bazel path isn't practical. This allows
users to override this path with the BAZELISK_WRAPPER_PATH env var /
.bazeliskrc config option.
@keith keith force-pushed the ks/allow-overriding-tools-bazel-path-with-bazelisk_wrapper_path branch from 0bc50ca to 3b95294 Compare May 14, 2024 16:44
@keith keith changed the title Allow overriding tools/bazel path with BAZELISK_WRAPPER_PATH Allow overriding tools/bazel path with BAZELISK_WRAPPER_DIRECTORY May 14, 2024
@keith
Copy link
Member Author

keith commented May 14, 2024

updated

@fweikert
Copy link
Member

Thank you!

@fweikert fweikert merged commit 47f6047 into bazelbuild:master May 14, 2024
2 checks passed
@keith
Copy link
Member Author

keith commented May 14, 2024

thanks!

@keith keith deleted the ks/allow-overriding-tools-bazel-path-with-bazelisk_wrapper_path branch May 14, 2024 18:05
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.

5 participants