Conversation
aherrmann
left a comment
There was a problem hiding this comment.
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. |
aherrmann
left a comment
There was a problem hiding this comment.
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
aherrmann
left a comment
There was a problem hiding this comment.
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.