-
Notifications
You must be signed in to change notification settings - Fork 2.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
Introducing the Forbidden API maven checks for Hibernate ORM #15729
Conversation
Is this something could be moved up to the |
hi @famod , yes that's my hope but I expect other extensions to pick it up gradually and in small steps - and probably will want to start with a smaller set of checks. I've started a related conversation on the mailing list. |
Sorry CI is all saturated, I had to kill this one for now. |
Shouldn't this also be excluded in |
@aloubyansky good idea, thanks! I'll improve that. |
@aloubyansky fixed that - and rebased. Thanks! N.B. could someone else approve as well? I'm afraid Yoann's approval isn't authoritative |
@Sanne Since I have never used this interesting plugin, please allow me this possibly stupid question: |
@famod yes that's how it works. We also often use different rules for the main vs test code; so for example I could be very picky about maintaining JDK13 compatibility for the "main" code, but relax the rules for testing. E.g. we allow System.out.println in tests, but not in the main code. |
@Sanne thanks for this explanation. I see a problem with this though: More often than not, one old method is deprecated and a new better/fixed variant of it is added. |
@famod yes occasionally that's a problem - but I'm not blaming this tool for such issues, it merely helps to ensure the code conforms to our own expectations: when the expectations can't be met, at least I'm aware and we can figure out something; worst case one allows a specific exception to the rules. And also this is no replacement to actually test with the target JDKs - but it greatly helps to anticipate issues early in the build cycle, and it helps preparing for compatibility with some new JDK w/o necessarily implementing it all in one go. Let's not focus too much on JDKs too; my favourite use of this tool is to extend the rules with custom restrictions. |
thanks for the approval help @aloubyansky :) |
@Sanne Ok, thanks again. I was trying to get a feeling for the limits of this. I also think this can be a nice dev support. Btw, GH actions are having a bad evening: https://www.githubstatus.com/incidents/s654n76c1bwr |
Fixes #15727