-
Notifications
You must be signed in to change notification settings - Fork 81
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
Cannot build with --experimental_strict_action_env
#480
Comments
Are you using Bazel from Nixpkgs? The official Bazel sets So we have two choices:
The latter looks more principled to me, but OTOH departs from what the other rule sets are doing, which seems to be to just assume some Python outside of the hermetic seal. |
This won’t fly, there is no one universally agreed on Python because of the v2 vs the v3 issue (like there is always one “current” Perl 5 interpreter). Most Python scripts don’t even specify which version they use ( |
I tried the second option I think with |
Bash would be a pain. The python code is quite pithy thanks to features that don't exist out-of-the-box in pure Bash. Haskell is an interesting option, but then there's a bootstrap problem. Not insurmountable - I think rules_go likewise bootstraps Go utilities used by the ruleset itself. I'm curious about your caching issues. Maybe you want to write that up (as part of a separate ticket)? |
BTW maybe your caching issues have the same root cause as #244? We haven't had a chance to investigate much yet, but IMO rules_haskell is doing some funny stuff under the hood that we shouldn't be doing. |
I'm not sure. I thought it might be Template Haskell (perhaps |
Blocked on bazelbuild/bazel#6817. |
Replied on that issue -- you may still be able to build with |
|
Note to the future: as described in https://github.com/bazelbuild/bazel/blob/master/tools/python/toolchain.bzl, I added a nixpkgs-sourced python toolchain - see TreeTide/kythe@aa98d59. (/cc tweag/rules_nixpkgs#39 since it was related) |
In trying to build with
--experimental_strict_action_env
(to see if it would help with some remote caching issues), I get errors relating to the fact that thels_modules
script cannot findpython
usingenv
. The command that gets run is something like:It seems that
python
is not being put on the explicitPATH
. I tried to rectify this by including anixpkgs_package
entry forpython
and usingpy_runtime
to reference it in thehaskell/BUILD
file, as follows:WORKSPACE
haskell/BUILD
But this didn't change anything. But I'm probably making some bad assumptions/doing something wrong here.
The text was updated successfully, but these errors were encountered: