Skip to content
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

buildGoModule: remove modSha256 #93513

Merged
merged 2 commits into from
Aug 19, 2020
Merged

buildGoModule: remove modSha256 #93513

merged 2 commits into from
Aug 19, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Jul 20, 2020

This is dead code but I'll wait until we're closer to 20.09 before merging.

@zowoq zowoq added this to the 20.09 milestone Jul 20, 2020
@ofborg ofborg bot added 6.topic: golang 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Jul 20, 2020
@zowoq zowoq removed this from the 20.09 milestone Jul 22, 2020
@zowoq zowoq added this to the 20.09 milestone Aug 15, 2020
@zowoq zowoq marked this pull request as ready for review August 15, 2020 03:25
@Mic92
Copy link
Member

Mic92 commented Aug 15, 2020

Yes. Actually I think should be not merge before the 20.09 branch off. So people that migrate from 20.03 to 20.09 have the time to update their packages - They would get one release time to migrate everything which is the smallest time unit we can give them.

@zowoq
Copy link
Contributor Author

zowoq commented Aug 15, 2020

They would get one release time to migrate everything which is the smallest time unit we can give them.

Why?

@Mic92
Copy link
Member

Mic92 commented Aug 15, 2020

They would get one release time to migrate everything which is the smallest time unit we can give them.

Why?

This was not present in 20.03. If users upgrade to 20.09 all their packages needs an update. If you have a infrastructure large enough, you may not upgrade all installations at once. The branch off is soonish anyway so these 200 lines should not bother us.

@zowoq
Copy link
Contributor Author

zowoq commented Aug 15, 2020

This was not present in 20.03. If users upgrade to 20.09 all their packages needs an update. If you have a infrastructure large enough, you may not upgrade all installations at once.

Yes, it is a breaking change that is documented.

People will need to set vendorSha256 = null anyway to use modSha256 so I don't see why we need to keep it around for another release cycle.

@Mic92
Copy link
Member

Mic92 commented Aug 15, 2020

Ok. Than we can merge it already.

@Mic92
Copy link
Member

Mic92 commented Aug 15, 2020

People that needs to support both can just have both checksums defined in the package.

@@ -257,8 +255,5 @@ let
});
in if disabled then
throw "${package.name} not supported for go ${go.meta.branch}"
else if modSha256 != null then
lib.warn "modSha256 is deprecated and will be removed in the next release (20.09), use vendorSha256 instead" (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you convert this in a throw statement that provides instruction to use vendorSha256 instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to throw.

@kalbasit
Copy link
Member

People that needs to support both can just have both checksums defined in the package.

With the change to throw the above won't be true anymore. I think it'll be useful for people to support both. Can we throw only if modSha256 is defined but vendorSha256 is not?

@zowoq
Copy link
Contributor Author

zowoq commented Aug 15, 2020

I'd rather we go back to the original which just outright removed modSha256 without throws or warnings.

IMHO the error that vendorSha256 is required is clear and it still allowed people to set modSha256 if needed.

Copy link
Contributor

@marsam marsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to merge it before the 20.09 branch-off, please update this bit:

attribute to pin fetched version data. <literal>buildGoModule</literal>
still accepts <literal>modSha256</literal> with a warning, but support will
be removed in the next release.

@zowoq
Copy link
Contributor Author

zowoq commented Aug 18, 2020

Oh, I didn't realise it said that.

It's been in the 20.09 release notes for a couple of months now, is it okay to change it to proceed with this PR?

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation labels Aug 19, 2020
@ofborg ofborg bot added 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Aug 19, 2020
@zowoq zowoq merged commit 259dcd1 into NixOS:master Aug 19, 2020
@zowoq zowoq deleted the rm-modsha branch August 19, 2020 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: golang 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants