Skip to content

Conversation

@CRogers
Copy link
Contributor

@CRogers CRogers commented Jan 6, 2023

Before this PR

Internally, someone had written the code:

configurations {
    testAnnotationProcessor.extendsFrom annotationProcessor
    testCompileOnly.extendsFrom compileOnly
} 

in their repo. They then only put the immutables processor in annotationProcessor, but not testAnnotationProcessor:

dependencies {
    annotationProcess 'org.immutables:value'
}

The plugin currently only checks dependencies declared directly in the configuration. This means the test source set had immutables, but was not configuring it to be incremental, meaning that the iteration loop for tests was a 2 min full compile.

Additionally, the current plugin does not handle the case where immutables would be brought in transitively.

After this PR

==COMMIT_MSG==
Ensure that baseline-immutables configures immutables to work incrementally when the immutables annotationProcessor dependency is not a direct dependency (ie it is brought in transitively or by an extendsFrom).
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Jan 6, 2023

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Ensure that baseline-immutables configures immutables to work incrementally when the immutables annotationProcessor dependency is not a direct dependency (ie it is brought in transitively or by an extendsFrom).

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bulldozer-bot bulldozer-bot bot merged commit deb150f into develop Jan 6, 2023
@bulldozer-bot bulldozer-bot bot deleted the callumr/baseline-immutables-fix branch January 6, 2023 17:58
@svc-autorelease
Copy link
Collaborator

Released 4.185.0

This was referenced Jan 6, 2023
bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Jan 6, 2023
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.185.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Ensure that `baseline-immutables` configures immutables to work incrementally when the immutables `annotationProcessor` dependency is not a direct dependency (ie it is brought in transitively or by an `extendsFrom`). | palantir/gradle-baseline#2465 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants