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: require vendorSha256 to be set in packages #89454

Merged
merged 1 commit into from Jun 17, 2020
Merged

buildGoModule: require vendorSha256 to be set in packages #89454

merged 1 commit into from Jun 17, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Jun 4, 2020

Require vendorSha256 to be set in packages with either a checksum or null.

cc @Mic92

@c00w
Copy link
Contributor

c00w commented Jun 4, 2020

I don't see why we want this - the default behavior here is sane and correct :)

@zowoq
Copy link
Contributor Author

zowoq commented Jun 4, 2020

I don't see why we want this - the default behavior here is sane and correct :)

Then we should be removing vendorSha256 = null; from packages and docs?

I don't see why we have implicit and explicit method for the same thing?

@c00w
Copy link
Contributor

c00w commented Jun 4, 2020

Hmmm - how would you rephrase the docs - "if upstream has a working vendor folder, don't set updateSha256"?

@zowoq zowoq requested a review from Mic92 June 15, 2020 23:55
@Mic92
Copy link
Member

Mic92 commented Jun 16, 2020

I like the explicit variant better. Most of the time one has to set vendorSha256 and not setting it might lead to harder to understand errors.
If it is missing however one will look up in the documentation what this checksum is about.

@c00w
Copy link
Contributor

c00w commented Jun 16, 2020

Okay - then lets merge.

@zowoq
Copy link
Contributor Author

zowoq commented Jun 17, 2020

@ofborg eval

@zowoq zowoq merged commit a2e6ff2 into NixOS:master Jun 17, 2020
@zowoq zowoq deleted the gomod branch June 17, 2020 01:07
@c00w
Copy link
Contributor

c00w commented Jun 19, 2020

Derp - just found a bug with this. If this is required, you have to set

vendorSha256=null
modSha256="..."

So we're breaking existing users of modSha256 :(

@zowoq
Copy link
Contributor Author

zowoq commented Jun 19, 2020

vendorSha256 has been in master for a month now and we're removing modSha256 for the next release anyway, do we want it fixed or should we leave it and remove the modSha256 code?

@Mic92
Copy link
Member

Mic92 commented Jun 19, 2020

Mhm. I think we should keep in support for modSha256 so people can add both checksums in packages they want to build for 20.03 and master. This makes transition easier. I have seen this scheme in NUR. Most people that are currently on master also should have migrated to vendorSha256 by now.

@zowoq
Copy link
Contributor Author

zowoq commented Jun 19, 2020

I think we should keep in support for modSha256 so people can add both checksums in packages they want to build for 20.03 and master.

In #90217 I've cherry picked the vendorSha256 changes (without the warning) so they can be used on 20.03.

@AluisioASG
Copy link
Contributor

Doesn't look like vendorSha256 is in the manual yet, I've been having to look through issues for guidance on how to keep my own projects building. Is there an issue tracking that?

@zowoq
Copy link
Contributor Author

zowoq commented Jun 20, 2020

https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/go.xml#L39

vendorSha256 in in the docs, not sure why the manual hasn't updated.

@c00w
Copy link
Contributor

c00w commented Jun 23, 2020

I'm guessing the manual is only built from stable?

@mikefaille mikefaille mentioned this pull request Jul 19, 2020
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants