-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Pull #14954: Add upwards compat for deprecated classes in maven-check… #14954
Pull #14954: Add upwards compat for deprecated classes in maven-check… #14954
Conversation
…aven-checkstyle-plugin
f0e5625
to
8dd54e3
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am against supporting new code which has been deprecated for 15 months. While it does seem we forgot to support an old version of the constructor during our change, our goal has always been to move forward and not support old things. We dropped Java 6 and 8 support, and have turned people away as we couldn't support them any longer. We will probably soon drop 11 support.
We still have runtime compatibility with the old maven plugin version. The only reason why we still have this compatibility with the plugin is because we have ingrained ourselves too much with the plugin. We have asked years ago for the plugin to update so we could move on and remove old code, but it hasn't really happened. Our goal now is eventually to break away from the maven plugin and create even more breaking changes. This case is just a sign of things to come. I see maven plugin now needs to decide how it will support versions as we break things further.
Even if we made this change and released it, you would only get it in 10.17.1. What does this mean for versions users want to use between 10.9.3 and 10.17.0 where this constructor didn't exist? Will they be unsupportable? Why do you need compile compatibility with 10.9.3+ if you still have runtime compatibility with us through our snapshot? Can't you just use 10.9.2 as the latest before the breaking change?
I'll get back to this next week. |
This is a runtime issue. Other thread said compile compatibility is what was being looked for. This also shows that if we released this, it would only be supported in 10.17.1 and users could not use versions between 10.9.3 and 10.17.0. Why doesn't maven plugin drop support for these old versions and use 10.9.3 as the base of what will be supported in the next plugin release? |
That would be acceptable.
Because we cannot raise the plugin baseline to Java 11. All core plugins will remain on Java 8. |
However, CS cannot be used on a Java 8 RE (Runtime Environment) since 10.0 . Also technically, you are already asking us to support 10.17.1 with releasing this PR, so I don't see how you can say you can't upgrade to 10.9.3 but can support 10.17.1. Can't you keep things as "Java 8" and use CS 10.9.3 similar to how you are doing now? I am sorry I am asking a lot of questions. I am sure admins will talk more on this over the weekend, I am just 1 of 3. I am still leaning against this as in the future you will have more pains and less options to overcome them when we do break from using the plugin. |
@michael-o ,
Second release will be in good position all further releases does not damage compatibility with maven plugin. So users will play with custom Checkstyle version freely. |
@motlin , It will be always a problem to ask be backwards compatible and need to use latest. |
@romani just to clarify, I'm trying to use recent versions of everything: java 21, checkstyle 10.17.0, and maven-checkstyle-plugin 3.4.0. And I'm trying to set up SARIF output. I'm one of the maintainers of https://github.com/eclipse/eclipse-collections/ where we go to great lengths to not break backwards compatibility so I can appreciate the effort here. For folks who do want to use an old version of Java, they'd also have to use an old version of Checkstyle. It seems reasonable to me that they'd also have to use an old version of maven-checkstyle-plugin. |
Although I will provide an elaborated answer next week. All I wanted is to provide to as many users (like @motlin) as possible Maven Core plugins with a reasonable set of transitive deps, in other words: make as many people happy as possible since they give us a lot, like Eclipse IDE which I have been using for the past 20 years. |
Yes, good decision. That why I suggesting to release Plugin 2 times to let people who can not use latest checkstyle library, just use not latest maven plugin. |
Guys, how to move forward with this? While I understand your sentiments, your limitations seems very arbitrary and biased to me. I try to include as many users as possible and -- as said -- moving to Java 11 is not an option at this time.
Note that I do not know what the technical motivation was to move Java 11 for Checkstyle. |
I am currently looking into option 3 with the given limitation put aside. |
Draft: apache/maven-checkstyle-plugin#143. Requires availability in Maven Central though. |
You can read the discussion at #9146 . Basically more groups were moving to Java 11 and a discussion was had to move forward to 11 too. There are already discussions to move to 17 soon.
From me, definitely not a bias to you. But I will admit we have have had hard times with the maven plugin. If you can't overcome this issue, things will get even harder when we break more compatibility in the future, which is planned.
There are no plans from me right now to put this into maven central. I am not against it, but it would be a big learn for me. https://github.com/xvik/gradle-quality-plugin already uses backport. Maybe look at how they use backport to see if maven plugin can do the same. As far as I know, they link to the url in the plugin repositories ( see example in https://rnveach.github.io/checkstyle-backport-jre8/ ). |
Scanned through the topic, there is zero mentioning about the technical benefits of 11, not to speak of 17.
The release procedure is idential as to the actual checkstyle since the group id is the same. Take the config, apply, release, done.
Not an option because all artifacts on Central must be selfcontained. One cannot reference to a repo outside of Central. If it is not on Central then it does not exist. |
There was none. It was more about "keeping up with the kardashians" then looking for any new features.
I don't do releases here. At one time we had to do manual releases, and I did it only once or twice. However, I never did the whole process from scratch, including applying for the name and new permissions, which is what backport will need since it is under a different organization. |
There's a part of this conversation I don't understand. If I'm on a project where I want/need to use an old version of Java (like Java 8), I must use an old version of Checkstyle too (like Checkstyle 9). If I'm using an old version of Checkstyle, I already have plenty of versions of the maven-checkstyle-plugin which work for me - all the recently released versions including the latest. Am I missing something? I was expecting that the way forward would be to release apache/maven-checkstyle-plugin#141 and to add documentation about which versions of the maven plugin are compatible with which versions of Checkstyle/Java. |
That PR was just a PoC. |
That is quite disappointing and more or less needless. No itch, no scratch.
@romani Do you do the releases? Would you be willing to publish to Central? |
@romani basically does the releases for the CS organization. Backport is under my organization. CS didn't want to support anything as official since they only support the latest version. This is a main reason I don't support this PR, as you want to basically bring back support for what we are trying to remove. Edit: Just adding Java 17 issue at #13209 . It has some other comments on why we want to move on to 17. |
We are small team, I try to not put more work on our team, we barely able to handle activities and support for main repo. |
I see, then the backport is not an option. 😟 |
8dd54e3
to
2e51881
Compare
…aven-checkstyle-plugin
…aven-checkstyle-plugin
2e51881
to
a43ccba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving PR.
There is disagreement in team in this update.
But I reusing supper power to move forward with merge.
Awesome, thank you. |
@michael-o , 10.19.0 is released please use it in plugin. |
The Maven Checkstyle Plugin cannot upgraded to 10.x at the moment, but users want to swap 9.x for 10.x at runtime. Add a new, deprecated constructor to SarifLogger to make that possible.
This covers apache/maven-checkstyle-plugin#141