-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[crd-generator] cycle in base java classes on Java 19+ #5907
Conversation
@@ -94,8 +102,14 @@ public SwapResult lookupAndMark(ClassRef originalType, String name) { | |||
return new SwapResult(null, false); | |||
} | |||
|
|||
private static boolean isIgnored(Value value) { |
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.
@shawkins I think this is a little bug in the detection of unmatched, but couldn't figure out why it's happening.
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'm not sure what you mean here at first glance - is there a test case that could highlight what you are describing?
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.
If you remove the logic of this method and return false
you have a reproducer of the issue.
A possible next step would be to define a List of |
Please don't go down this path. It still produces a schema that is not correct and adds new internal usage of schema swap that we don't need - you could just as easily handle this with a common mapping at the level of ZonedDateTime. But ultimately you'll end up doing that for a great number of classes - this is very brittle. |
Fair assessment, should we keep it as "manual" workaround? Open to ideas! |
The manual workaround is to a swap on the entire ZonedDateTime.
As mentioned in the other PR we can either use Jackson's schema logic - which will work automagically most of the time and keep redundant annotations to a minimum. Or we can error out if we don't think we'll produce the approriate schema. There are two paths to that - either we still use Jackson's schema logic and detect when it has something other than an object, or start blessing or marking packages / classes as supported - most of the problems are going to be with java / javax. That latter one feels too britle as well. |
I'm ok with this workaround, the alternatives seem to bring additional complexity, but happy to hear more opinions/feedback/proposals. |
Superseded by #5877 |
Description
Proposal to attempt to fix #5866
Type of change
test, version modification, documentation, etc.)
Checklist