-
-
Notifications
You must be signed in to change notification settings - Fork 822
WIP: Do not dynamically set the detekt version due to performance reasons #2200
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
Conversation
|
This is huge!! 🎉 |
|
I haven't tested this PR yet, but have you considered the issues I mentioned at #2035 (comment)? There was also some input from @marschwar and @BraisGabin, and from what I saw there were still some open questions. Reducing build time in CI could be done by only running Gradle plugin tests on a single platform and by migrating some functional tests to unit tests. It's also possible the build cache is not working correctly here - in theory if there are changes not affecting Gradle plugin then those tests should not need to be run since results are stored in build cache. Investigating that should address the slow CI builds. Also when comparing performance issues we should compare invocations of This PR will also prevent testing snapshot releases of detekt with the Gradle plugin. The Gradle plugin has issues but I think it's better to tackle those issues one by one rather than take this approach unless some of these downsides are addressed. |
I think that this PR is not about our times in CI. It's about the performance of the gradle task for any user.
I'll measure it and upload the data in the issue. |
Agreed, was just responding to a point made in #2035 (comment) |
42a738c to
96c91bb
Compare
I've replied on that issue. in short: Gradle ships with
Right. Maybe it is the combination with the included build. Do you remember why we used a composite build for the gradle plugin?
Most users do not use the type resolution features and this PR would speed up detekt for them.
What if we still allow custom cli versions but print a warning that this way is deprecated and should only be used to test snapshots?
|
It's a different JAR but unless it relocates classes isn't there chance of conflict? I'm no expert though :/
Could be, but as far as I can see the included build is independent of the main build, so changes in modules like
Yes, it was because when testing the Gradle plugin in the detekt project itself every change in the Gradle plugin required uploading the artifact to a local Maven repo before consuming it in detekt itself. That was annoying when testing changes to the plugin. An alternative to this might be using the BTW I checked the build cache usage on some build scans and the Gradle plugin tests are cached properly in the build cache and restored on future CI runs, as long as the dependencies don't cause a rebuild. No low-hanging fruit here.
To make dev easier we want to specify the artifact, not just the version, so passing |
It should be fine. I don't think they would change the API somehow but rather fix something or implement a workaround until the kotlin team fixes it holistically.
+1, I will try this now. The performance benefit should remain but overriding via Lets try releasing a RC-1 then and test on our projects. Edit: Basically this means we are getting rid of the included build setup. |
96c91bb to
00641ff
Compare
00641ff to
48e7241
Compare
…#2035 This deprecates setting the detekt version via the toolVersion property of the extension.
48e7241 to
2528e59
Compare
8ab42e4 to
07e6af0
Compare
07e6af0 to
1114a07
Compare
1114a07 to
b28170f
Compare
12c6050 to
c43a07a
Compare
This incorporates the changes proposed by @BraisGabin in #2035 .
Having the gradle plugin perform nearly as fast as the cli is huge enough that we should deprecate choosing the shipped detekt version.
Closes #2035