gradle does not provide modules/*.jar for transient dependencies (regression)
See original GitHub issueWhat you were trying to do
Get a module’s sources for development and play testing.
What actually happened
Got module’s sources, built module, but the game was not able to resolve the module’s dependencies in the Advanced Game Setup screen.
How to reproduce
- start with empty
modules/
workspace - groovyw module get JoshariasSurvival
- gradlew jar
- gradlew game
- create new game, advanced setup, observe JoshariasSurvival is lacking its transient dependencies
Log details and game version
I’m not actually watching this error happen right now, this report is assembled from Niruandaleth’s notes and my understanding of gradle.
Discussion
I expect this started when Core Upheaval removed transient dependencies from many module.txt at around the same time as the Gradle 6.4 branch made some adjustments to how it treats compile-time dependencies.
The thing that makes the .jar
files show up in the modules/
directory when a module is built from source is the RemoteModuleGatherer
we have in our gradle configuration.
The crux of the issue is here:
it’s only checking the compile-time classpath, which don’t include the transient dependencies.
Changing that to include the run-time classpath is a small change. However, I’m not fully confident that the PC facade knows it needs to resolve the runtime classpath of the modules before it starts. If it doesn’t, there will be nothing for the RemoteModuleGatherer to observe and copy.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top GitHub Comments
Oh heck I forgot about this! It’s a significant issue but it was waiting on #4032 for so long. That has now been merged; we should see if this issue is still reproducible.
It would - you just pick a cloud storage option instead of provisioning a simple disk attached to the system directly 😃
Plus with the caveat that my memory isn’t perfect I don’t recall us ever pruning anything in Artifactory, so we might still have snapshots in there 5+ years old and so on. We should come up with an approach to automatically prune as seems sensible, that should drop disk usage dramatically. When we ran out of space like half the usage was backups or logs 😅
Finally the 3rd party deps we rely on are probably relatively tiny, and rarely update, I suspect they might total less than a single game release 👍 But if the project can get everything from our repository that might save some lookups.