-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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_6: init with a WIP implem #186106
bazel_6: init with a WIP implem #186106
Conversation
/cc @avdv @ylecornec @the-mikedavis @uri-canva Starting here the work to get bazel_6 packaged. This does not work yet, I have lots of trouble with "ijar" internal tool that refuses to run. Any idea ? |
@r2r-dev is this of any interest for you ATM ? I would love to do some peer programming |
It works for me on diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9431ba72bb0..1fe320bbb95 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15459,12 +15459,14 @@ with pkgs;
bazel_self = bazel_5;
};
- bazel_6 = callPackage ../development/tools/build-managers/bazel/bazel_6 {
+ bazel_6 = darwin.apple_sdk_11_0.callPackage ../development/tools/build-managers/bazel/bazel_6 {
inherit (darwin) cctools;
- inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
+ inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation;
buildJdk = jdk11_headless;
runJdk = jdk11_headless;
- stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
+ stdenv = if stdenv.isDarwin then
+ darwin.apple_sdk_11_0.stdenv else
+ if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
bazel_self = bazel_6;
}; |
Thanks a lot @uri-canva. To be honest I am puzzled as to why your patch works at all. I have pushed a fix that makes sense (to me) for my linux build. Would you mind trying it without your patch ? And if it fails, see if your patch still works ? That would help me a lot. Thanks ! |
I still need my patch to build at all, but even with the patch I'm now hitting issues like this:
I tried to add |
Sorry was going to explain the changes then I realised they're quite big and very darwin specific so I figured I would just push them, let me know if you have any questions. |
If you're happy with the changes mark the PR as ready to review. They look good to me. |
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.
Builds and tested with the bazel examples on NixOS.
ping @layus |
@layus I'll go ahead and push this PR forward since I'm interested in having it merged, hope you don't mind. If you have changes you'd like to make we can fix them up in a follow up PR. |
@uri-canva Thanks for pushing this forward. I have no particular expectations on this PR. I already deployed the working linux version where I needed it. This is my way to share upstream. What bugs me is that you had to patch Bazel around the "error: [strict] Using type [...] from an indirect dependency" java issue. On my side I discovered that commit 1f11d01 somehow fixed the bug. I wonder what part of these changes did it. Would you mind opening an issue upstream for these new patches ? Another annoying part is that stdenv entries become darwin ones. Reading the code, it took me quite some time to understand that these darwin things are just stdenv on linux. I guess it's a nixpkgs-wide issue, but that delayed my feedback quite a lot (until I found some darwin users to discuss with). But none of that should be a blocker for merging an unstable bazel_6 package. I have asked colleagues for a review. I will merge this once we get a proper review. |
@uri-canva The reason why Erin's review is grey is because he does not have commit access. It's green otherwise. I do not like this feature as it seems to imply a difference in the review itself, when it only really about permissions. I see the use case for a green review when that reviewer could potentially merge the pr, but still... |
Yeah the darwin stdenv is quite confusing, hopefully we can remove it soon. You're right, the java error is due to something in the jdk, you can see some discussion in bazelbuild/bazel#16109. It's already fixed upstream, but the fix hasn't made it through all the different ways you can configure the jdk. |
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.
I just noticed something, was src-deps.json
updated? update-srcDeps.py
doesn't work with bazel 6 as it is now.
Ignore me, was using it wrong. |
pkgs/development/tools/build-managers/bazel/bazel_6/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/tools/build-managers/bazel/bazel_6/default.nix
Outdated
Show resolved
Hide resolved
@@ -2,7 +2,8 @@ | |||
bazel | |||
, bazelTest | |||
, bazel-examples | |||
, gccStdenv | |||
, stdenv | |||
, darwin |
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.
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.
As this is in the tests, and not in the main bazel_6 derivation, I think we can ignore this for now. Unless it changes the test significantly ?
Got some more information upstream, I think the strict deps thing is due to our java setup: bazelbuild/bazel#16146. I haven't been able to narrow it down any further than that, I'm ok with merging this as is and continuing looking into it later. |
@uri-canva I made one cleanup commit. Let's wait CI and merge it. |
@uri-canva For some reason, GH still thinks that you requested changes... |
@uri-canva x86_64-darwin tests failed. Is it something you care about ? Anything we can do to fix it ? |
That's very strange, let me try to build it locally. |
Oh you only did a cleanup commit after the last one, I don't think that would have caused the issue, it might be some ofborg specific issue. Since it's a new derivation, let's try to merge it as is and see if it builds on hydra. |
Whoops I just realised we should have updated the name of the PR. |
Done 🎉 . Thanks a lot for your efforts ! |
Darwin built on hydra, so the failure was an ofborg specific issue: https://hydra.nixos.org/eval/1779113?filter=bazel_6&compare=1779052&full=#tabs-aborted However linux seems to have failed, though I don't understand the failure. Is it because of sandboxing? |
Seems like a transient network failure to me. Let's wait next eval ?
Le 5 septembre 2022 01:30:02 GMT+02:00, Uri Baghin ***@***.***> a écrit :
…Darwin built on hydra, so the failure was an ofborg specific issue: https://hydra.nixos.org/eval/1779113?filter=bazel_6&compare=1779052&full=#tabs-aborted
However linux seems to have failed, though I don't understand the failure. Is it because of sandboxing?
--
Reply to this email directly or view it on GitHub:
#186106 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Nice, we got a green build: https://hydra.nixos.org/build/190329458. |
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes