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
Align impsort and formatting settings in bootstrap with main project #28150
Align impsort and formatting settings in bootstrap with main project #28150
Conversation
940b76a
to
12ac2ae
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
That's a confusing failure. Locally, I'm good. (Cleaning and rebuilding to see if caches are biting me.)
|
12ac2ae
to
82a4352
Compare
This comment has been minimized.
This comment has been minimized.
82a4352
to
21ae63e
Compare
21ae63e
to
e71aaf7
Compare
I got a bit confused by the local impsort caching (which not cleaned by clean). I now think I have a working set of updates, for bootstrap parent and several other projects in The downside is that updating the sourcecode to these settings changed 832 files. In the future this will reduce churn, but in the short term it's a massive churn and massive changeset, so I'm not sure how best to handle the PR. (I confirm the only change in it is my pom changes and an automated |
I'm not sure it's a good idea to do that for 2.14. As we will have to backport things in 2.13 for a while and we are going to have a ton of conflicts. Another option would be to backport that to 2.13 too. |
I wondered about changing the XML, but not the files. Then we could temporarily disable the enforcement on those modules so they gradually become correct as people edit them, and then flip the enforcement switch later. The downside is that a significant proportion of low-change files may never become correct just through normal editing, and we'd have to do the extra piece of work to turn off and on the enforcement. |
Yeah, I would prefer we do not make our lives harder with the backports - |
We could also do it incrementally by project, so we could do extensions-maven-plugin now, since that's the one which is causing me pain, and then gradually work through the others so the diffs stay manageable. |
As I mentioned, one option would be to also backport this to 2.13. I would expect it to be safe. But I would prefer having @rsvoboda (for QE) , @mkouba and @aloubyansky (because it's mostly their code) 's blessing before doing that. But for me it's either:
|
This comment has been minimized.
This comment has been minimized.
As another option, could we turn off the enforcement on the affected projects in the 2.13 stream? That would mean we won't be fighting the import sorting in 2.13, which we would be otherwise, with or without this change. (Anytime someone edits one of the affected files in the IDE, they have to undo the IDE's changes to the Java file.) |
+1 Let's do this now...
|
No. I don't want 2.13 to turn into a pile of crap with commits changing imports and then back and so on. We are enforcing all this for a good reason. |
Yes, after I thought about it I realised disabling on 2.13 might be almost as much risk as enforcing the correct rules, without any of the corresponding benefit. There's a larger question about whether we want a common parent for those modules and why they inherit direct from jboss-parent, but we certainly don't want to go there for 2.13 :) |
I vote for I would like to see 2 commits in this PR, one for config changes + one for the changes done to For 2.13 branch we may need to backport just the config changes commit and run the build to apply the changes as 2.13...main shows 227 commits. |
Yeah unfortunately, that is a bad idea. Because you would then have a commit that completely fails the build which is annoying when you bissect. So let's do one commit but @holly-cummins could you create a specific 2.13 PR once you're done with this one. By applying the rule changes and then formatting specifically for 2.13? |
Will do on both counts - thanks @gsmet . I think the current failures are a cache issue; the impsort plugin doesn't invalidate the cache if its own settings change... so things look great locally and then fail in the build. I'd wiped caches two levels down, but I was lazy and didn't do a |
3b446cf
to
f6338a1
Compare
+1 for backporting to 2.13 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bc4f59e
to
140d5dc
Compare
This is looking good to push now, except that I'll need to rebase (again). I'll rebase just before we want to merge, since otherwise it will just keep spinning off big builds. There are about 5 poms with changes, and it's worth looking at those, since I did make a few mistakes in my original edits. The formatting changes are - hopefully - very boring. |
This comment has been minimized.
This comment has been minimized.
140d5dc
to
8398d79
Compare
I've rebased, and this is looking good to merge, imo. |
I noticed I was getting churn in my imports while I was working in some of the bootstrap projects ... and then I the build checks failed because the imports were in the wrong order.
On investigation, I think the problem is that the
bootstrap-parent
pom inherits from the jboss parent, not the Quarkus parent. That means it's missing some settings, including the impsort and formatting settings. That would be ok, except that we all have shared IDE import order settings, which match what's inquarkus-parent
, and do not match the impsort defaults.I've duplicated the parent settings into the bootstrap parent, and run a sort on the project.