Paul Woitaschek
07/08/2023, 9:30 AMPaul Dingemans
07/08/2023, 10:02 AMPaul Woitaschek
07/08/2023, 10:05 AMPaul Woitaschek
07/08/2023, 10:06 AMPaul Woitaschek
07/08/2023, 10:07 AMPaul Dingemans
07/08/2023, 10:17 AMkotlinter
based on 0.49
of ktlint to ktlint-gradle
based on 0.50
. Maybe you get more insights when first migrating to ktlint-gradle
based on 0.49
before upgrade to latest ktlint version.Paul Woitaschek
07/08/2023, 10:19 AMPaul Woitaschek
07/08/2023, 10:20 AMPaul Dingemans
07/08/2023, 10:24 AMI have to live with the gradle plugin nightmare
Paul Woitaschek
07/08/2023, 10:26 AMPaul Dingemans
07/08/2023, 10:30 AMPaul Woitaschek
07/08/2023, 10:33 AMPaul Dingemans
07/08/2023, 10:43 AMmateusz.kwiecinski
07/08/2023, 10:44 AMPaul Woitaschek
07/08/2023, 10:47 AMmateusz.kwiecinski
07/08/2023, 11:02 AMmove the plugin the ktlint repositoryI'm not 100% sure it would be change that much. My reasoning: • Since it would still be maintained by the same people, issues like you faced today would be still present. It wouldn't necessarily address any of the issues people face • It is a good practice to let gradle wrappers pick their own tool version, so Gradle plugin versioning and core ktlint jar would still have to be independent • Issues with incompatibility with newly released ktlint versions can be resolved by introducing https://github.com/Kotlin/binary-compatibility-validator to the core ktlint project, and it would actually be a benefit for all types of integrations (spotless, maven plugins etc) And don't get me wrong, I see benefits of having an official Gradle integration, I'm just not sure merging them would address any of the issues you're describing here 🙂
Paul Woitaschek
07/08/2023, 11:04 AMthe recommended gradle integrationIf that is the case I suggest to move it to a parent
ktlint
organization and remove this pin:
https://github.com/JLLeitschuh/ktlint-gradle/issues/569mateusz.kwiecinski
07/08/2023, 11:05 AMPaul Dingemans
07/08/2023, 11:08 AMPaul Woitaschek
07/08/2023, 11:18 AMIt is a good practice to let gradle wrappers pick their own tool version
Usually I do agree, but in this specific case I don't. I think that argument makes sense for dependencies which are consumed by libraries. In this case people want to use the gradle plugin because LFS is causing complexities. I would be totally fine to just apply a 0.5.0 Gradle plugin to get ktlint 0.5.0
Paul Woitaschek
07/08/2023, 11:19 AMmateusz.kwiecinski
07/08/2023, 11:19 AMIf that is the case I suggest to move it to a parent ktlint organization and remove this pin:I agree that sounds like viable option 👍 The ktlint repo could be pulled as a git submodule so it can be compiled with latest code with no extra effort (which would address what Paul wrote above) However, I think the challenge here is that someone would have to take ownership of that proces + it requires collaboration from both sides (and I don't think I'm personally one of the sides here 😅)
Paul Dingemans
07/08/2023, 11:26 AMktlint
repository and move ktlint-gradle
to a submodule of the base project (comparable to`ktlint-cli`). Working from one repository will more naturally lead to collaboration. But I can not maintain it by myself because I have too little knowledge of gradle.
and I don’t think I’m personally one of the sides hereDoes this mean, you don’t’ want to maintain the plugin in a new setup?
mateusz.kwiecinski
07/08/2023, 11:46 AMWouldn’t it be more clear to work from the ktlint repository and moveit would work too, I think 👍 It would be even better from your perspective, since you'd get immediate feedback if the gradle plugin still works fine + refactoring options would automatically udpate plugin updates. I proposed having a separate repository, because it felt like safer option if maintaining compatibility with older versions would be still a requirement (every adjustment to new ktlint apis would have to be explicitly added and tracked for future use).to a submodule of the base project (comparable to`ktlint-cli`)ktlint-gradle
Does this mean, you don’t’ want to maintain the plugin in a new setup?I've tried to start contributing to
ktlint-gradle
in addition to kotlinter
, but it turned out some of the decisions that had been made cause extra effort needed to provide proper support. I sticked with kotlinter, but then, given things weren't moving at a pace I would want to, I created my own, more lightweight plugin (https://github.com/usefulness/ktlint-gradle-plugin) which focuses more on performance rather than supporting all possible cases/workflows.
So, as a conclusion, since the discussion here is to move ktlint-gradle
code, I don't think I should have much input here 😅
I'll definitely will try to contribute, but since it will be Jonathan's and John's code, I'd assume the direction how the plugin should move forwards will be up to them, and they'll lead the project 🙂Paul Dingemans
07/08/2023, 11:52 AMmateusz.kwiecinski
07/08/2023, 12:07 PMmateusz.kwiecinski
07/08/2023, 12:08 PMPaul Dingemans
07/08/2023, 12:15 PMI can try to put down my thoughts into a Github issue + come up with base setup for the plugin (living within base ktlint repository, as you suggested). I’m thinking of just the bare bones, that would allow testing if the setup works for everyone, and would enable us to reuse existing code or writing new one, whatever is preferred later.
I should have some free time in 1-2 weeks, so somewhen around then 🙂Cool and tnx in advance
wakingrufus
07/16/2023, 8:42 PMwakingrufus
07/17/2023, 1:11 AMPaul Dingemans
07/17/2023, 4:15 PMWe have debated the “merge to a separate repo” issue to death before, always with the conclusion that there is not actually much benefit to that, for the reasons @mateusz.kwiecinski summarized above.I do believe there is a benefit to integrate a ktlint gradle plugin in the project. But that is only feasible if a maintainer / developer is joining me in the project to work on it. It might be a solution is to expand ktlint with a ‘simple’ gradle plugin which is strongly coupled with the project (e.g. it only supports the current version of the KtlintRuleEngine). For other use cases, the existing plugins can be used (provided that they are still maintained).
Paul Woitaschek
07/17/2023, 4:21 PMwakingrufus
07/18/2023, 1:38 PMPaul Dingemans
07/18/2023, 1:56 PMwakingrufus
07/18/2023, 2:06 PMwakingrufus
07/18/2023, 2:11 PMPaul Dingemans
07/18/2023, 2:23 PMwakingrufus
07/18/2023, 2:40 PMPaul Dingemans
07/18/2023, 2:47 PMwakingrufus
07/18/2023, 2:53 PMwakingrufus
07/18/2023, 2:54 PMSha Sha Chu
07/18/2023, 5:21 PMjlleitschuh
07/24/2023, 5:01 PM> the recommended gradle integration
>
If that is the case I suggest to move it to a parenthttps://github.com/JLLeitschuh/ktlint-gradle/issues/569 I'm more than happy to move to one common organization, but I really don't think the single repository makes sense. Also, I'm a 👎 on git submodules. I've heard some haneous stories around how they complicate dependency management significantly. Instead, I'd propose that every merged commit toorganization and remove this pin:ktlint
ktlint
publish a snapshot version, that the main branch of ktlint-gradle
depends upon until a release, at which point the release would be pinned to a non-snapshot version number.
The biggest problem is, I truly don't know what this will change regarding development/release cadance. Just because these two repositories are in the same organization doesn't immediately mean that the people developing ktlint
will know how to fix or add features to ktlint-gradle
. The knowledge about how Gradle, and it's API's work won't immediately transfer to those people, just because the repo changed orgs.jlleitschuh
07/24/2023, 5:04 PMktlint-gradle
anymore, beyond PR reviews. We are looking for more interested contributors, and if this change means more people will likely step up to assist with maintenance, I'm happy to support that transitionjlleitschuh
07/24/2023, 5:04 PMjlleitschuh
07/24/2023, 5:08 PMPaul Dingemans
07/24/2023, 5:50 PM