-
Notifications
You must be signed in to change notification settings - Fork 134
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
More laziness to prevent Stackoverflow exceptions. #2260
Conversation
Generate changelog in
|
Hmm
|
import org.gradle.process.internal.ExecActionFactory; | ||
// CHECKSTYLE:ON | ||
|
||
final class BaselineJavadocToolAdapter extends JavadocToolAdapter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carterkozak Very, very unfortunately Gradle casts the public interface for JavadocTool
to the internal JavadocToolAdapter
:
So I've had to extend that class (thankfully none of it is final) and managed to inject what it needs to work. It feels brittle doing this but we don't have a choice. The only possibly redeeming factor is this seems to not have changed in 2 years since it was created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Least gross option, heh
Released 4.130.0 |
###### _excavator_ is a bot for automating changes across repositories. Changes produced by the roomba/latest-baseline-oss check. # Release Notes ## 4.130.0 | Type | Description | Link | | ---- | ----------- | ---- | | Fix | Make interactions with gradle java toolchains more lazy, so `StackOverflowError`s do not occur | palantir/gradle-baseline#2260 | To enable or disable this check, please contact the maintainers of Excavator.
Before this PR
When testing this out on a real project using a jdk provider that did a configuration resolutions, Gradle checks (for some reason) checks whether
JavaCompile
are using toolchains:https://github.com/gradle/gradle/blob/v7.4.2/subprojects/plugins/src/main/java/org/gradle/api/plugins/JavaBasePlugin.java#L290
This then causes a loop:
After this PR
==COMMIT_MSG==
Make interactions with gradle java toolchains more lazy, so
StackOverflowError
s do not occur==COMMIT_MSG==
Possible downsides?