-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add minimal examples of toolchains in WORKSPACEs #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
I think this could use a README with instructions how to build these examples.
It might also be good to add a .bazelrc
to each example setting the host platform to enable nix support and a shell.nix
to make these examples more self contained.
We should also test these on CI to make sure that they keep working.
Fails on MacOS 11 with
I also see a bunch of errors of the form
On
The error looks different at first, but the way Cabal determines whether a library is missing is by trying to build a C program that links against that library. Issues with the linker it self could potentially manifest this way as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I've done another round of review on this.
Re the MacOS issue, I'd say we should view it as orthogonal to this PR and try to get this PR merged independently of that issue.
For py_binary rules, bazel creates a stub python script that launches in the system python by default, the stub_shebang allows changing which python is executed. This should create a more hermetic environment for running python binaries, and fixes bazel version 5 on systems without python3 installed. https://docs.bazel.build/versions/main/be/python.html#py_runtime_args bazelbuild/bazel#14159
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that looks great!
I think the remaining CI failure can be fixed by adding a .bazelignore
file that tells bazel to skip examples
from the top-level workspace. See rules_haskell for reference
This addresses issues #168 and #172.