-
Notifications
You must be signed in to change notification settings - Fork 150
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
Remove mavenix take 2 #3806
Remove mavenix take 2 #3806
Conversation
…upcoming nixos 23.11 stable release
buildPhase = '' | ||
runHook preBuild | ||
'' + lib.optionalString buildOffline '' | ||
mvn org.apache.maven.plugins:maven-dependency-plugin:3.6.1:go-offline -Dmaven.repo.local=$out/.m2 ${mvnDepsParameters} |
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.
using latest version of the go-offline plugin which does not build snapshot jars of the local project
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.
Um, you're not 100% requiring every single dependency to be pulled in by this, are you? go-offline has bugs that means it pulls in most of the dependencies, but not 100%. So if this is going to cause something to break if one or two dependencies isn't included in this, this solution isn't going to work.
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.
No, there are indeed dependencies that the go-offline
plugin does not detect. The missed ones have to be manually included here:
Lines 66 to 71 in fc1859b
manualMvnArtifacts = [ | |
"org.scala-lang:scala-compiler:2.12.18" | |
"ant-contrib:ant-contrib:1.0b3" | |
"org.apache.ant:ant-nodeps:1.8.1" | |
"org.apache.maven.wagon:wagon-provider-api:1.0-alpha-6" | |
]; |
I've added a section in the README troubleshooting explaining this:
Lines 435 to 436 in fc1859b
- `[ERROR] Failed to execute goal ... org.apache.maven.artifact.resolver.ArtifactNotFoundException: The following artifacts could not be resolved: org.scala-lang:scala-compiler:jar:2.12.18 ...` | |
Add `"org.scala-lang:scala-compiler:2.12.18"` (without the `jar:`) to `manualMvnArtifacts` in `flake.nix` |
-o -name \*.snapshots.xml \ | ||
-o -name \*.snapshots.xml.sha1 \) \ |
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.
we still get ....snapshots.xml
files which contain dates of the latest snapshot, which we need to remove to make the build (hopefully) deterministic
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.
Looks good but as discussed let's wait until a local change to a Java file lands in the master branch and gets merged into this branch.
The refactor of the K derivation in #3806 broke the booster integration test shell, because we stopped wrapping llvm-backend bins with the `NIX_LLVM_KOMPILE_LIBS` env var. This PR restores that functionality and I have confirmed this fixes the integration tests in booster.
Switch from using mavenix to using
buildMavenPackage
back-ported from the upcoming nixpkgs 23.11 stable release. This may increase build times somewhat and updating maven dependencies will no longer be automatic, but arguably the automation never works and It's difficult to figure out why it's failing.I've updated the README troubleshooting section with the two cases of manual intervention, necessary with the new packaging solution, when maven dependencies change.
The hash mismatch should only happen when deps change, but if we want to automate this in ci then we can do something similar to: https://github.com/runtimeverification/hs-backend-booster/blob/175f10b16ad50dd2bb50fcfe68cbcacd79760317/scripts/update-haskell-backend.sh#L21C3-L22