gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

Dependency resolution should not unnecessarily lock the target of a project dependency #904

Closed adammurdoch closed 5 years ago

adammurdoch commented 5 years ago

Dependency resolution locks the target project of a project dependency in order to calculate project metadata, or to resolve the artifacts and files of a configuration, if not already done. However, when this happens at task execution time, a long running task in the target project will block the worker thread.

We should take advantage of the fact that a task has declared that it will (indirectly) need these pieces of metadata in order to execute to prepare the metadata in some way before starting the task.

We should also verify that locking does in fact happen only when the particular value is not already available.

adammurdoch commented 5 years ago

There's a fix in https://github.com/gradle/gradle/pull/7476.

I want to do a clean up PR before we consider this finished.

adammurdoch commented 5 years ago

Some clean up in https://github.com/gradle/gradle/pull/7493.

I'd like to do a few more tidy-ups before closing this.

adammurdoch commented 5 years ago

Some more clean up in https://github.com/gradle/gradle/pull/7552. This will do for now, I think.