Skip to content

Conversation

@ianbotsf
Copy link
Contributor

@ianbotsf ianbotsf commented Apr 9, 2025

Issue #, if available:

(none)

Description of changes:

Slimmed down version of #70 that focuses strictly on eliminating this compiler warning:

w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Member

@lauzadis lauzadis left a comment

Choose a reason for hiding this comment

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

Do we also want to take the ktlintVersion deduplication change you made?

@ianbotsf
Copy link
Contributor Author

Turns out this PR is broken. aws-kotlin-repo-tools builds and passes ktlint just fine but upstream projects fail to run ktlint because of the removed kotlin-compiler-embeddable transitive dependency. Got to spend some more time debugging this.

@ianbotsf ianbotsf marked this pull request as draft April 11, 2025 14:38
@ianbotsf ianbotsf marked this pull request as ready for review April 11, 2025 18:22
@ianbotsf ianbotsf requested review from a team, 0marperez and lauzadis April 11, 2025 18:22
@ianbotsf
Copy link
Contributor Author

OK now I think it's right. Ready for second review!

@@ -1,5 +1,5 @@
[versions]
ktlint = "1.5.0"
ktlint = "1.3.0"
Copy link
Member

Choose a reason for hiding this comment

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

Do we really have to downgrade our ktlint version to get this fix? If so, could we open an issue to Ktlint to fix this problem, so we are unblocked for future upgrades?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The downgrade is to match the version we were previously setting explicitly in configureLinting. In that sense, it's only a downgrade for aws-kotlin-repo-tools which was previously using 1.5.0.

The 1.5.0 version actually isn't relevant to the compiler warning. The same warning happened whether we used 1.3.0 or 1.5.0. The actual problem was using the non-shadowed ktlint-cli variant.

@ianbotsf ianbotsf merged commit caedfe6 into main Apr 11, 2025
5 checks passed
@ianbotsf ianbotsf deleted the fix-embedded-compiler-warning branch April 11, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants