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

Function to return supported Kotlin version #6472

Merged
merged 17 commits into from Oct 4, 2023
Merged

Conversation

kkocel
Copy link
Contributor

@kkocel kkocel commented Sep 7, 2023

Introduce the function that returns the supported Kotlin version as mentioned in: #6198 (comment)

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (348cea0) 85.18% compared to head (8983a58) 85.18%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6472   +/-   ##
=========================================
  Coverage     85.18%   85.18%           
  Complexity     4037     4037           
=========================================
  Files           564      564           
  Lines         13273    13273           
  Branches       2387     2387           
=========================================
  Hits          11306    11306           
  Misses          773      773           
  Partials       1194     1194           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@3flex 3flex left a comment

Choose a reason for hiding this comment

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

I just want to note that while this will work in the majority of cases it is possible to change the version of detekt-cli that the plugin calls, and the resolved version of the CLI dependency might depend on a different Kotlin version which will cause failures again.

I think we can get the resolved Kotlin dependency version from Gradle though when I last tried this it didn't seem that easy. But in the meantime annotating with Incubating will at least flag in IDE that this isn't 100% stable or foolproof.

@kkocel
Copy link
Contributor Author

kkocel commented Sep 8, 2023

I just want to note that while this will work in the majority of cases it is possible to change the version of detekt-cli that the plugin calls, and the resolved version of the CLI dependency might depend on a different Kotlin version which will cause failures again.

I thought about adding dependency to detekt-cli and query supported version from there, but I assumed that Kotlin versions would be consistent across modules.

@kkocel
Copy link
Contributor Author

kkocel commented Sep 11, 2023

@3flex is there anything here that I should change or it's good to be merged?

@BraisGabin BraisGabin added the pick request Marker for PRs that should be ported to the 1.0 release branch label Sep 14, 2023
@BraisGabin BraisGabin added this to the 2.0.0 milestone Sep 14, 2023
@BraisGabin
Copy link
Member

I vote to merge this. They should not be unaligned. And if they do we could always change this implementation without any breaking change.

@BraisGabin
Copy link
Member

@kkocel could you also update the documentation pointing out how to use this workaround? And that it should only be needed if the user applies the spring dependency manager (I can't recall the exact name)

Add information about the Spring Dependency Management Plugin.
Update snippet to use Kotlin version resolution method.
@detekt-ci
Copy link
Collaborator

detekt-ci commented Sep 25, 2023

Warnings
⚠️

It looks like you're editing the un-versioned copy of our website. This affects only users on the 'next' version of detekt, and it's correct only if you intend to document a future change or feature. If you intended to make a change also for the current version of detekt, please make sure you edit the equivalent file inside website/versioned_docs/ as well.

Generated by 🚫 dangerJS against 8983a58

@kkocel
Copy link
Contributor Author

kkocel commented Sep 25, 2023

@BraisGabin thank you. I added the relevant part in the future docs and mentioned Spring Dependency Plugin there.

@vercel
Copy link

vercel bot commented Oct 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
detekt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 6:12pm

@BraisGabin BraisGabin merged commit c40c299 into detekt:main Oct 4, 2023
23 checks passed
cortinico pushed a commit that referenced this pull request Oct 30, 2023
* Function to return supported Kotlin version

* Update documentation

Add information about the Spring Dependency Management Plugin.
Update snippet to use Kotlin version resolution method.
mgroth0 pushed a commit to mgroth0/detekt that referenced this pull request Feb 11, 2024
* Function to return supported Kotlin version

* Update documentation

Add information about the Spring Dependency Management Plugin.
Update snippet to use Kotlin version resolution method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation gradle-plugin pick request Marker for PRs that should be ported to the 1.0 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants