Skip to content
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

Disable detached configurations? #5284

Closed
vitalyster opened this issue May 7, 2018 · 6 comments
Closed

Disable detached configurations? #5284

vitalyster opened this issue May 7, 2018 · 6 comments

Comments

@vitalyster
Copy link

vitalyster commented May 7, 2018

Gradle project configuration takes ages for me with "resolving dependencies for xxx:detachedConfiguration158" messages. Why so many configurations created? How to clean them? How to disable them? Can't find proper documentation for that.
Using Gradle 4.7 (older versions up to 4.2 at least have the same issue)
I'm using this project both with IDEA and command-line Gradle builds, so I'm not sure who exactly creates these detached configurations every time.

@oehme
Copy link
Contributor

oehme commented May 8, 2018

For configuration time performance issues, please provide the following information:

  • a build scan by running gradle help --scan
  • a JFR snapshot by using the Gradle Profiler running gradle-profiler --profile jfr --warmups 10 --iterations 20 help

Without this information we won't be able to help.

Answering your initial question: There is no way to "disable" detached configurations, they are there for a reason, usually because a plugin needs some dependencies for task execution. However, they should never be resolved at configuration time, so there must be some misconfiguration in your build or some bug in a community plugin you are using. The information I requested above will help us find out where that problem is.

@vitalyster
Copy link
Author

both build scan and profile snapshot (for 'help' task) does not show any performance issues and there was no these "resolving dependencies for detachedConfigurationXXX" messages

@oehme
Copy link
Contributor

oehme commented May 8, 2018

Then the problem is not at configuration time. Please profile the scenario where you actually see this problem.

@vitalyster
Copy link
Author

vitalyster commented May 8, 2018

I did scan on 'check' target and I see dozen of detached configurations on "Dependencies" page of scans.gradle.com interface, and most of them are contains Spring Boot dependencies. Indeed, problem started when I switch my Spring project to Spring Boot 2 and looks like it is the issue with their Gradle plugin

@oehme
Copy link
Contributor

oehme commented May 8, 2018

In that case please share the build scan with them so they can fix any potential problems.

@gavenkoa
Copy link

gavenkoa commented May 4, 2019

I have probably same issue. It can be related to 'io.spring.dependency-management' plugin.

See:

https://discuss.gradle.org/t/what-is-detachedconfiguration-i-have-a-lots-of-them-for-each-subproject-and-resolving-them-takes-95-of-build-time/31595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants