gradle-processors icon indicating copy to clipboard operation
gradle-processors copied to clipboard

processor transitive dependencies get added to the project as provided for IntelliJ

Open SerialVelocity opened this issue 9 years ago • 6 comments

As the title says. This wouldn't be a problem except it overrides "compile" dependencies by switching them to provided. They then can't be found when running the application through intelliJ

SerialVelocity avatar Sep 22 '15 11:09 SerialVelocity

Fix released as v1.1.4. Thanks @mavant!

alicederyn avatar Jan 06 '16 12:01 alicederyn

Apparently this fix only fixed a subset of the issues, and may have introduced other problems, so we're rolling back this PR. Reopening bug :(

alicederyn avatar Jan 06 '16 20:01 alicederyn

Tagging @jtibshirani and @rjullman; they've also been running into things related to this.

mavant avatar Feb 25 '16 23:02 mavant

We ran into a related issue on Roadrunner where the dagger processor pulled in guava 0.15 as provided, which ended up causing conflicts with our default version (guava 0.18). Looking forward to a fix!

jtibshirani avatar Feb 25 '16 23:02 jtibshirani

@chrisalice https://github.com/palantir/gradle-processors/blob/master/src/main/groovy/org/inferred/gradle/ProcessorsPlugin.groovy#L103

.minus += [compile/runtime] ?

henryptung avatar Mar 15 '17 22:03 henryptung

Although, to contribute some more semantics to the discussion:

processor is effectively an unnecessary-at-runtime compile-dependency. It compiles code against the library (as an annotation provider) but, by default, does not add it to runtime unless otherwise required by another library.

provided (in IntelliJ terminology) seems to refer to an exclude-from-runtime compile-dependency. It is useful primarily when running in some environment which provides some dependencies, which (to avoid conflicts) should/must be excluded from the built distribution/archive.

henryptung avatar Mar 15 '17 22:03 henryptung