-
Notifications
You must be signed in to change notification settings - Fork 58
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
Mismatching hashes and dependency versions for gradle2nix itself #26
Comments
This is strange, I'm not sure why jackson is being pulled in at all. Let me investigate. |
With the changes I made in #27 I was able to bypass the issue for now and and to then successfully apply Thanks for making that possible. |
Does this work with the latest commit on |
This is still broken in master, as far as I know, but not with jackson. For me I see this with javax.servlet-api:
|
Looks like I'm seeing the same mismatching hashes as @stites right now. Thanks for confirming that this does not only happen for me.
|
Ah, once I run |
@tadfisher see #28 |
#28 is basically the same thing that I did in #27, but for a different dependency. Since Maybe it would be helpful to have a flag inside That does not help really fix any specific problem, but I think it would be useful for users to recover from things like this and I think it might have other uses as well. |
@mschwaig That's not really a viable solution; if Anyway, what's going on is that we are hashing the artifact in the Gradle cache, which is apparently not the same as the artifact from the source repo. I'm not sure what Gradle is doing to alter these files (perhaps it's regenerating metadata) but the fix is to hash the artifact as we resolve it ourselves. I'll have a PR up shortly. |
Ah, that file is being served with CRLF (Windows) line separators, and Gradle is saving it to the cache with LF (Unix) line separators. I've moved hash generation to our own resolvers, but this is extremely slow as we have to redownload every dependency. It might be worth doing this only for POM artifacts just to mitigate this issue, or somehow normalizing POMs at fetch time. |
This is the root cause, FWIW: gradle/gradle#9072 |
|
Works for me as well! Thanks! |
Still (or again?) having this issue with the following command:
The output is the following:
|
Yep, same problem here:
|
This issue is caused by me; when I hack on gradle2nix, it's pulling hashes from my local gradle cache, which normalizes certain artifacts such as POM files. It's time to add some CI to avoid this. |
This is the
To test for that kind of issue it's actually nice that starts from a docker image with nothing relevant in |
I'm unable to run this tool due to this error.
|
Hmm, I'm getting the opposite error right now:
|
I just tried to build gradle2nix with the command suggested in the README.md:
which always seems to give me a mismatching hash for different random parts of jackson.
For example with the latest nix docker image:
And with my local machine running unstableNix:
Looking into that a bit I saw that the jackson version in fixtures/basic/basic-kotlin-project/kotlin/build.gradle.kts also does not match the jackson version in gradle-env.json which looks wrong to me and leads me to think the mismatch might simply be because some version change got lost in either one of those files.
I have not looked into this further or actually gotten gradle2nix to build yet.
The text was updated successfully, but these errors were encountered: