Skip to content
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

Use provided configuration for optional language dependencies #411

Conversation

jevanlingen
Copy link
Contributor

What's changed?

Groovy, Kotlin and CSharp dependencies are changed to compileOnly. The filechecker-classes have been adjusted with a reflection check

What's your motivation?

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

…s and add file-checkers with a reflection-class-exists-check
@jevanlingen jevanlingen linked an issue Dec 23, 2024 that may be closed by this pull request
build.gradle.kts Outdated Show resolved Hide resolved
Co-authored-by: Tim te Beek <[email protected]>
@jevanlingen jevanlingen marked this pull request as ready for review December 23, 2024 12:06
@jevanlingen jevanlingen self-assigned this Dec 23, 2024
@jevanlingen jevanlingen added the enhancement New feature or request label Dec 23, 2024
@jkschneider
Copy link
Member

I'd like to use the old nebula provided configuration plugin instead here, such that the dependency winds up with a provided scope. Most of the tooling we have that executes recipes have runtime dependencies on language bindings and "provide" them in a parent classloader scheme that is highly similar to the original intent of the provided scope in Maven (in the old days when J2EE containers provided servlet types, etc.).

https://github.com/nebula-plugins/gradle-extra-configurations-plugin?tab=readme-ov-file#using-the-provided-plugin

@jkschneider jkschneider changed the title Use compileOnly configuration for optional language dependencies Use provided configuration for optional language dependencies Dec 23, 2024
build.gradle.kts Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/main/java/org/openrewrite/staticanalysis/CovariantEquals.java
    • lines 80-80
  • src/main/java/org/openrewrite/staticanalysis/EmptyBlockVisitor.java
    • lines 215-216
  • src/main/java/org/openrewrite/staticanalysis/ExplicitInitializationVisitor.java
    • lines 72-72
    • lines 94-94
  • src/main/java/org/openrewrite/staticanalysis/FinalizeMethodArguments.java
    • lines 208-208
  • src/main/java/org/openrewrite/staticanalysis/HiddenFieldVisitor.java
    • lines 199-199
    • lines 244-244
  • src/main/java/org/openrewrite/staticanalysis/HideUtilityClassConstructorVisitor.java
    • lines 98-98
    • lines 128-128
    • lines 191-191
  • src/main/java/org/openrewrite/staticanalysis/NoRedundantJumpStatements.java
    • lines 98-98
  • src/main/java/org/openrewrite/staticanalysis/OperatorWrap.java
    • lines 96-96
    • lines 134-134
    • lines 182-182
    • lines 215-215
    • lines 246-246
    • lines 283-283
    • lines 316-316
    • lines 364-364
    • lines 397-397
  • src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrToString.java
    • lines 69-70
  • src/main/java/org/openrewrite/staticanalysis/ReplaceDuplicateStringLiterals.java
    • lines 249-249
  • src/main/java/org/openrewrite/staticanalysis/TernaryOperatorsShouldNotBeNested.java
    • lines 357-357
  • src/main/java/org/openrewrite/staticanalysis/UseLambdaForFunctionalInterface.java
    • lines 73-73
    • lines 113-113

@sambsnyd sambsnyd merged commit 0a5c49b into main Jan 3, 2025
1 of 2 checks passed
@sambsnyd sambsnyd deleted the 410-use-compileonly-configuration-for-optional-language-dependencies branch January 3, 2025 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use compileOnly configuration for optional language dependencies
4 participants