apple / apple/servicetalk

Improve Gradle idea task so it generates isolated main/test classpaths per module

Open
#503 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1k
Forks
229
Avg merge
23h 23m
Merged PRs (30d)
16

Description

The IntelliJ control files generated by the Gradle IDEA plugin wrongly share the `testRuntime` classpath of `servicetalk-http-router-jersey` with `servicetalk-data-jackson-jersey`, which unfortunately gives access to `jersey-media-json-jackson`. This makes many tests in `servicetalk-data-jackson-jersey` fail because they are built specifically for ST's Jackson serializer. Thus we disable the test suite altogether if we're in this scenario to prevent overwhelming developers with meaningless and puzzling failures [1].

It would be much better to improve the `idea` task to generate isolated main/test classpaths per module, the same way the IDEA Gradle plugin does.

[1] https://github.com/servicetalk/servicetalk/blob/master/servicetalk-data-jackson-jersey/src/test/java/io/servicetalk/data/jackson/jersey/JerseyDataJacksonTestSuite.java#L48-L52

Contributor guide

Open the contributing guide

Research direction

Start with the Gradle `idea` task and compare its generated control files with the behavior of the IDEA Gradle plugin. Use `servicetalk-data-jackson-jersey/src/test/java/io/servicetalk/data/jackson/jersey/JerseyDataJacksonTestSuite.java` to reproduce the classpath contamination. Done means each module has isolated main and test classpaths and the affected tests no longer see unrelated Jersey dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.