Add support for JSpecify annotations#4644
Add support for JSpecify annotations#4644coehlrich wants to merge 3 commits intoeclipse-jdt:masterfrom
Conversation
|
Originally I was optimistic regarding jspecify filling a relevant gap, but it's been quite a while since. At some point I lost interest as I sensed more focus on making things different rather than unifying prior art. I haven't checked their status for a while (last time I locked it lacked specification at the level of detail that would be necessary for implementing compliant checking). With the prospect of null-restricted types in standard Java I'm not convinced that now is a good point in time to invest much into supporting jspecify. As you focus on null marked, can you describe the differences between that one and ecj's |
|
The main difference is: While JSpecify's |
There is more to it:
Perhaps this allows users to apply |
What it does
Adds support for JSpecify annotations
How to test
Author checklist
Currently I have only started implementing support for the null mark annotations (and the
kotlin.Metadatacheck is a part of the spec in the Null-marked Scope section)There are 4 Nullness Operators:
UNION_NULL: from theNullableannotation and includes nullMINUS_NULL: from theNonNullannotation and excludes nullUNSPECIFIED: for unannotated code outside of null marked locations and is unspecifiedNO_CHANGE: used internally including for everything recognized inside null marked locations that aren't explicitly annotated where for regular types is the same asMINUS_NULLand for type variables uses the provided type argumentdetectStandardAnnotationcurrently only returns a long and so can't currently return anything defined inExtendedTagBits. How should I changedetectStandardAnnotationto allow usingExtendedTagBits?Currently there are multiple places where annotations are added to existing types internally. How should they be handled since
NullMarkedappliesNO_CHANGEinstead ofMINUS_NULL?