-
Notifications
You must be signed in to change notification settings - Fork 299
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
consider making all packages considered annotated by default #1081
Comments
I'm dumb and should read the wiki |
Actually it's not fully obvious to me the best way to do this. Are you making your annotated packages like |
hahah, you're fast. I am now. I guess the best way is to use the I'm changing the description of the original ticket to consider making "all packages" considered NullMarked default, perhaps with a flag to turn that off, if it's too much. Or perhaps simply setting AnnotatedPackages would. I'd rather have the negative list and go bug people. |
Let me think through the implications of this and how best to do it. Optimistically, if more and more jars start becoming annotated, this might be a desired default more and more often. Another option, if you're willing to bug people 🙂 If there is a third party library that is annotated, they should be able to add a |
does it pick up a |
I think I like the idea that if no |
I want this to work and would add support for it on the NullAway side (it's not there yet). But it's a bit tricky to get it working exactly as users want, as discussed in jspecify/jspecify#496.
There is no support for this yet; I could look into it but not sure if we would support it. Should probably open a separate issue.
There is discussion related to this in #574. I am leery of NullAway just chugging ahead if no |
I'm kind of the opposite. I'm not a new user. I always assumed (for no logical reason) that it'd figure jars on my classpath out. I don't think new users (based on me) would ever consider that libraries aren't being picked up. This might be solved by improved documentation, or perhaps a more aggressive strategy in a different way, perhaps requiring packages to be explicitly configured in general. So if I set
thinking about it as above, that potentially solves another issue that I hadn't thought of. What if all packages are already accounted for. My code is all Nullmarked via module-info. I have a small library that has no 3rd party dependencies. Should I have to set
Maybe the right way forward for this ticket is if you can't be "smarter" be "louder" :p |
Sorry for the slow response. I think what you're suggesting is a mode where every method / class / package / module must be either explicitly Thanks for opening the other issues! |
I just realized that I wasn't getting checks from 3rd party jars that are annotated. Then I realized that it's going to be a massive pain to develop a comprehensive list of annotated packages from 3rd party jars.
Whilst using
UnannotatedSubPackages
should work, I think it would be better if all packages were considered "null marked" by default, unless they are annotated by something that says they aren't. I might be wrong in this attitude and maybe I should bug "jgit" to add a recognized (are there any)? annotation to say its packages are marked.The text was updated successfully, but these errors were encountered: