On Thu, 4 Jun 2026 13:28:28 GMT, Viktor Klang <[email protected]> wrote:
>> This is how it is in mainline, I don't think I should introduce noisy diff >> to the mainline review PR. > > Makes sense. I wonder if it would be easier (for future PRs in this space) to > do the mainline-alignment as a separate, initial, PR, then do a follow-up PR > with the specific changes. I don't think I can - lworld is well tested so it's almost impossible to split the mainline alignment out without causing some test failures ( >> That would be an assertion on the `getDeclaredFields` facility. I am more >> concerned about this annotation processing because the `@driver` clause is >> more likely to be accidentally omitted or have typos in test directives and >> becomes hard to debug. There is no such problem with >> `Class.getDeclaredFields` so I don't think field omissions is a problem. > > I think there's a semantic difference between asserting "any fields returned > must be strict" and "two fields are to be returned, named "x" and "y" and > they must both be strict". There is, but I don't think this argues for complicating such a sanity check. You can always request extra coverage for every failure path of every test you write; it is an endless rabbit hole, and I argue a misused `@driver` has no compile-time or validation from other tests that it deserves some sanity test; meanwhile `getDeclaredFields` is well-tested and much less error-prone, so that's where I put the stopping line. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2326#discussion_r3357049757 PR Review Comment: https://git.openjdk.org/valhalla/pull/2326#discussion_r3357043709
