-
Notifications
You must be signed in to change notification settings - Fork 104
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
Explicitly declare nullability of declared API #129
Comments
As the amount of actual API we introduce is rather low (primarily a few of the interface types in jMolecules DDD) I'd consider this a low priority. Also, the first GA version of jSpecify is pretty young, it still has a few rough edges. There's work anticipated in that area for the next major revision of Spring Framework, favor but also some hesitation expressed in the interview with Jürgen here:
I'm not saying we need to adhere to Spring Framework, but describing the lack of usage of such annotations as “making something impossible” is a bit of a stretch, as virtually none of the Java world already work with them. |
there are alternatives that aren't jspecify. It's just one such set of annotations.
actually almost all of the java world works with them, just not according to spec. Rather you have to do the opposite of what they want an annotate all the things. Almost all of the java world just looks at the stringy name now, instead of relying on a pure list of annotations. That said, I'm not beholden to those, I don't much care, I'd just like to use something (that's not javax due to jpms).
Fair, but I did offer to put in the effort. |
Twisting my and your own words is not gonna get us any further. You explicitly mentioned jSpecify and I replied to that. I don't have anything to add what I wrote above: we hardly define any methods that would benefit from us deciding about the nullability constraints of those. I am happy to revisit the places we already have actual assertions in place. That said, you can interpret the absence of nullabilty annotations an indicator of us currently not taking a stance on exactly that fact. |
I also said that. I think you are trying to twist my words.
yeah, but that's not how existing tooling works with that. I might read it that way, but tooling doesn't ensure any safety in that case and can provide a variety of assumptions. |
just an FYI, looks like spring is moving to jspecify spring-projects/spring-framework#28797 (comment) |
You've read it here first, two weeks ago.
|
Fair enough although you'll see that that ticket has some back and forth. The last I'd heard it was anticipated but they weren't going through with it yet because 1.0 didn't offer what they were looking for. I couldn't be sure you weren't working off of the information I had prior to that. which has been "they said they were", "they said they weren't". now they said they were again. |
I wish the package/modules (at least for ddd/event) were "Null marked".
@Nullmarked
being the annotation provided by https://jspecify.dev. Although I wouldn't care if another JPMS compatible library was used.Although it should probably have runtime annotations since it seems jakarta-annotation is source only, which doesn't work for spotbugs, and some other things.
not having this will make my replacing some of my own interfaces harder if not impossible.
Note: at this time I don't think... anything really supports just
@Nullmarked
although some support non null by default and that can be used as a hint.I'd be willing to put in some legwork here.
The text was updated successfully, but these errors were encountered: