question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gradle does not provide modules/*.jar for transient dependencies (regression)

See original GitHub issue

What 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:

https://github.com/MovingBlocks/Terasology/blob/957543938f28d703e3175e0ca6f2c5f64da0dd1d/build.gradle#L262

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:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
keturncommented, Dec 22, 2020

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.

0reactions
Cervatorcommented, Dec 28, 2020

unless the Nexus/K8s would automagically solve the disk space issue somehow

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression in 5.5 when using dependency constraints for non ...
Using dependency constraints to resolve a non-jar dependency without a POM file fails because Gradle expected to find either a POM file or...
Read more >
Android - Gradle - How to download transitive dependencies ...
The dependencies won't be downloaded automatically in this case. You have to specify all the dependencies of your jar as dependencies for ...
Read more >
Avoiding dependency hell with Gradle 6
Dependency hell is a big problem for many teams. The larger the project and its dependency graph, the harder it is to maintain...
Read more >
Include transitive dependencies in jar - Gradle Forums
I have an app module, named “app”, which uses 'the ... However, it does not contain the transitive dependencies declared in “common”, ...
Read more >
Declaring Dependencies between Subprojects
Project dependencies model dependencies between modules. Effectively, you are saying that you depend on the main output of another project. In a Java-based ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found