[GRADLE-2889] detached configuration contains results of different detached configuration Created: 16/Sep/13  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.8-rc-1
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

Due to the configuration results caching, there's some problem with detached configurations. Detached configuration from project X may contain results from detached configuration of project Y.



 Comments   
Comment by Gradle Forums [ 16/Sep/13 ]

Resolved by using `ResolverStrategy` and reflective instantiation to compatible with multiple gradle releases.

Comment by Gradle Forums [ 16/Sep/13 ]

This change may have uncovered a bug in Gradle's dependency resolution listing. It results in a NPE in certain scenarios by providing incorrect library listings. The assumption is that declared = (resolved + unresolved) dependencies. Instead the resolved dependencies includes _extra_ dependencies from adjacent projects. This resulted in a NPE as the mapping for a key was not found (`comparator.compare(version, currentVersions[key]) > 0`).

For more details see the plugin's [issue]([1]https://github.com/ben-manes/gradle-v...).
----------------------------------------------------------------------------------------
[1] https://github.com/ben-manes/gradle-versions-plugin/issues/8#issuecomment-24377832

Comment by Gradle Forums [ 16/Sep/13 ]

Thanks for the feedback. Do you have a self-contained reproducible example for this (outside your plugin)?

Comment by Gradle Forums [ 16/Sep/13 ]

I can probably get an example, using the plugin, to fail for debugging. If I can get that far then since the plugin is simple gradle api calls, we can decide whether to pull out those calls or debug with the plugin. I would write this as a spock integration test, but a previous Gradle version broke the test's ability to resolve dependencies from maven central.

Comment by Gradle Forums [ 16/Sep/13 ]

Here is a [minimal example]([1]https://github.com/ben-manes/gradle-1...). It clearly demonstrates that v1.7 and v1.8-rc-1 differ.
----------------------------------------------------------------------------------------
[1] https://github.com/ben-manes/gradle-1.8-rc-1-bug

Comment by Peter Niederwieser [ 16/Sep/13 ]

See forum entry for further information (somehow didn't get synced to JIRA).

Comment by Sterling Greene [ 20/Nov/15 ]

This is happening again

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:34:11 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.