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

Document how to run tools on the command line #26

Merged
merged 2 commits into from Apr 3, 2024

Conversation

alexeagle
Copy link
Contributor

Workaround all the Bazel nonsense.

Copy link
Contributor

@mark-thm mark-thm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mark-thm mark-thm merged commit 9a0e53e into theoremlp:main Apr 3, 2024
6 checks passed
mark-thm added a commit that referenced this pull request Apr 16, 2024
)

It's common for users of multitool to want to run tools in the current working directory. In #26, @alexeagle documented a technique we've used for a while with creating a script and symlinking to it. Our internal copy of this script is a bit more complicated to help avoid expensive calls to Bazel that simple `bazel run` calls don't really need. More refinements have been proposed in #27. All of these things are fundamentally workarounds for bazelbuild/bazel#3325.

To help simplify things, this PR adds a convenience wrapper that captures the execpath, switches to $BUILD_WORKING_DIRECTORY, and then runs the desired tool. The resulting shell script gets to use a very simple `bazel run`, should be compatible across any slew of Bazel options, and cache as well as any typical run target.
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

2 participants