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
use latest protobuf (3.12), remove overrides where possible #91446
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.
or-tools looks good. Upstream wants 3.12.2, I’m sure 3.12.3 is fine.
I’m somewhat worried that future or-tools versions may require newer protobuf than our default protobuf again, but if we’re planning to keep the default protobuf up to date now, that shouldn’t be an issue.
IIRC tensorflow requires 3.8 #87014 (comment) cc: @bhipple |
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.
It seems the override is not needed anymore for monero. Just tested and monero{,-gui} builds and runs fine.
@dotlambda If you don't have to experiment with |
Please do so. Home Assistant is quite fragile when it comes to its dependencies' versions. |
OK, removed changes to Home Assistant and its dependencies from this PR. We can discuss this in one of the subsequent PRs. |
@GrahamcOfBorg build python38Packages.cirq python37Packages.cirq |
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.
Diff on python-packages.nix
& cirq.nix
LGTM as maintainer. Builds clean via OfBorg
@FRidh or should this go to staging first? |
@@ -5212,7 +5210,7 @@ in { | |||
protobuf = callPackage ../development/python-modules/protobuf { | |||
disabled = isPyPy; | |||
doCheck = !isPy3k; | |||
protobuf = pkgs.protobuf3_8; | |||
protobuf = pkgs.protobuf3_12; |
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 think this was added for tensorflow, because it requires protobuf==3.8 #81278 tensorflow/tensorflow#35573
Could you please add an override for tensorflow to use protobuf3_8?
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.
That's not ok because then one can get a closure with multiple versions of the protobuf package. This is unsolvable with Python and a reason why we do not always use the latest version of libraries but instead versions that keep most things working.
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 understand the reason, but this makes it impossible to package software that requires newer python-protobuf into nixpkgs.
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.
Yes, in case of libraries, you are correct. We need to balance this. Thus, that also means, if one or a few packages are extremely slow updating, we may need to reconsider whether they should be part of Nixpkgs.
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.
TensorFlow requires protobuf >= 3.8.0
, not ==
.
#81278 bumped this line from 3.7 to 3.8, but doesn’t seem to indicate that a later version wouldn’t have worked. tensorflow/tensorflow#35573 appears to be an issue with a specific binary distribution.
I see no reason to think it wouldn’t work if everything consistently used the current stable version. Why not protobuf = pkgs.protobuf
?
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 see no reason to think it wouldn’t work if everything consistently used the current stable version. Why not protobuf = pkgs.protobuf?
That sounds good to me. Care to send a PR trying that for tensorflow?
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.
@bhipple It would have no effect without this PR, because we still have pkgs.protobuf = pkgs.protobuf3_8
in master
.
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.
My take is: let's get this into master/staging and fix breakages that might happen. If there are breakages, these should be fixed in upstream, but we'll never discover them if we stick to the old version of protobuf.
Is there any update on this PR? I've just stumbled upon another case where a package can't be upgraded because of old protobuf version. |
I did my best here, but the discussion has stalled. I am still in favor of merging this and fixing all potential breakages. I will happily rebase this PR to staging if that's preferred. |
Another PR which needs the latest protobuf: #93231 |
I don't know how the staging pipeline works, but that sounds like a decent idea to me. Some things will probably break, but protobuf needs updated. |
I'm in favor of merging as long as we can unpin tensorflow to use the latest protobuf consistently with the python libs. It looks like the bound on 3.8 is just a lower bound, so let's go for it? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Changed the target branch to |
Motivation for this change
The goal of this PR is to set protobuf to the latest available version (currently 3.12) and remove all protobuf overrides where possible. Some of the changes are possible when a package is updated to more recent version, so this PR contains a couple of version updates (in separate commits) too.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)