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
bazel: 0.28.1 -> 0.29.0 #67835
bazel: 0.28.1 -> 0.29.0 #67835
Conversation
- Upgraded dependencies - dependencies script upgraded to take into account new WORKSPACE rules - Tests now depends on the `distdir` Runtime bazel now also depends on the `distdir` setting which appears in the global configuration file. This increases the bazel closure size by 85 MO for stuffs which can normally be downloaded at runtime by bazel. However, any invocation of `buildBazelPackage` (such as in `bazel-watcher`) may fail in nix sandbox if theses files are not available at runtime. If this overhead is too important, we may later evolve to a finer grained solution, where buildBazelPackage declares the list of necessary dependencies.
The breakage in rules_haskell is due to c481351 which is already in nixpkgs master. So I now consider that my current PR (update to 0.29.0) is not worse than the current status of bazel in nixpkgs. I'll try to fix rules_haskell later and see if the fix leads to a change in nixpkgs. @Profpatsch @kalbasit review please. |
@GrahamcOfBorg build bazel bazel.tests |
I would like to see a review from @aherrmann. He fixed a Python issue recently (see #66718), which seems to have resurfaced. Also see #66723, which should avoid the problem from coming back, but has yet to be merged. |
@mboes I don't see the relation between your comment and my PR (and the python issue detailled inside). I bisected the regression to this commit c481351 which replaced an hardcoded python path (used to launch python executable in My understanding is that bazel in nixpkgs is not correctly passing the My point of view is that I don't think the current PR have anything to do with the error I'm describing (considering that I can observe the same issue with bazel 0.28.1 from nixpkgs master) and that we can merge this PR independently of #66718 and #66723 and any future work done to work on the python path issue. |
Are you sure this isn’t an upstream regression? It looks highly dubious to me. |
Apparently bazel is trying to externalize all the rules. You can see here the reference for, amongst others, Here you can see the discussion for
|
This seems to be orthogonal to #66723, indeed. I've run the shebang tests from that branch on this PR and they passed, so there are no new unpatched shebangs.
That's odd, #66718 solved the similar issue for me with bazel 0.28.1. I see how c481351 is related. But, it seems that another change in Bazel 0.29 triggers this issue in combination with c481351.
Looking at the Alternatively, did you try extending the Working around the issue downstream in rules sets by extending |
With bazel 0.28.1 from nixpkgs before or after c481351? I initially thought that the issue was in bazel 0.29, but when I updated rules_haskell to use latest nixpkgs (including bazel 0.28.1 and c481351), I had the same issue.
Not yet, that's indeed a good idea. However I'm afraid of the semantic. The point of c481351 was exactly to avoid an hardcoded python interpreter and instead rely on I'll try to create a simple reproduction code (i.e.: simpler than rules_haskell) and I'll open a nixpkgs issue. In the meantime I've opened tweag/rules_haskell#1067 which tracks this as a rules_haskell issue and get the same details / conclusion as you did right now. I apologize for duplicate work, I should have put a notification here. I however do agree now that the issue is in nixpkgs and not in rules_haskell. |
Luckily, it won’t happen for 1.0 yet: bazelbuild/bazel#9006 (comment)
Do we merge this PR then, nonetheless? |
From my point of view there is no argument against merging it. |
After c481351, #66718 directly addresses a change from that commit.
Yes, that's what I meant by
Modifying the Bazel default config to provide a better substitution for |
Note:
This is a work in progress. It seems to work, but I cannot buildSee latest comment, this commit is not responsible for rules_haskell breakage.rules_haskell
for now using this, so I'm not sure.rules
distdir
Runtime bazel now also depends on the
distdir
setting which appearsin the global configuration file. This increases the bazel closure
size by 85 MO for stuffs which can normally be downloaded at runtime
by bazel. However, any invocation of
buildBazelPackage
(such as inbazel-watcher
) may fail in nix sandbox if theses files are notavailable at runtime.
If this overhead is too important, we may later evolve to a finer
grained solution, where buildBazelPackage declares the list of
necessary dependencies.
Motivation for this change
Upstream update.
Things done
As said in the commit message, this PR largly increases the size of the bazel closure because now bazel depends on all the
srcDeps
which is, at that time, 85 Mo.That's a bunch of files that bazel may use at runtime in
buildBazelPackage
.sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @