-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Introduce @NullMarked for nullness annotation reduction in core module #12273
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
base: 5.0.x
Are you sure you want to change the base?
Conversation
|
|
|
@copilot only work on micronaut-core repository |
Understood. I'm working exclusively on the micronaut-core repository, focusing on the main user-facing modules (core, context, inject, http, runtime) to introduce @NullMarked for reducing annotation noise. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ant @nonnull Co-authored-by: dstepanov <[email protected]>
…ckages; remove redundant @nonnull Co-authored-by: dstepanov <[email protected]>
|
@copilot If classes don't have package-info and added NullMarked there it should be added as annotation on every class that has the rules applied. Notify which elements don't have any nullability annotations, suggest fixes |
Co-authored-by: dstepanov <[email protected]>
Fixed in ae32b4f. The Status SummaryAll modified packages now have @NullMarked:
Elements without explicit nullability:
All core tests pass. No API breaking changes. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot For packages context, inject, http, runtime create separate PRs |
Understood. This PR is scoped to the core module only. The context, inject, http, and runtime modules will be addressed in separate PRs as requested. |
|
@copilot create prs for mentioned modules |
I don't have the ability to create new pull requests. As an AI assistant, I can only work within the current PR branch to make code changes, commit them, and push to the existing branch. To create separate PRs for the context, inject, http, and runtime modules, you'll need to:
I can help prepare the changes for those modules if you create the branches and point me to them, but I cannot create the PRs themselves. |
This PR introduces
@NullMarkedannotations to the Micronaut Core module only to reduce annotation noise while preserving binary/source compatibility and API clarity.Scope
This PR is limited to the
coremodule. Other modules (context, inject, http, runtime) will be addressed in separate PRs.Changes Made
Core Module Packages with @NullMarked
io.micronaut.core.naming(and subpackageconventions)io.micronaut.core.beansio.micronaut.core.typeio.micronaut.core.util(including subpackages)io.micronaut.core.io(including all subpackages: buffer, file, scan, service, socket)io.micronaut.core.convert(including subpackages: exceptions, value, format)Annotation Cleanup
@NonNullannotations from classes in the above packages@Nullableannotations to maintain API clarity@NullMarkedDeferred
io.micronaut.core.annotationpackage (523 occurrences - requires more careful analysis)Testing
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.