Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Nullable annotations part 1 - #2253

Merged
sbomer merged 4 commits into
dotnet:mainfrom
sbomer:nullableAnnotations1
Sep 3, 2021
Merged

sbomer merged 4 commits into
dotnet:mainfrom
sbomer:nullableAnnotations1

Conversation

@sbomer

@sbomer sbomer commented Sep 2, 2021

Copy link
Copy Markdown
Member

Enable nullable annotations for LinkContext and the XML processing classes. I chose these as a starting point for no reason in particular, except that they produced a lot of warnings. Also includes other small fixes for things I noticed. In particular PTAL at the removed ReportUnresolved calls in LinkContext.Resolve - those looked like they were producing redundant warnings for cached null results.

Enable nullable annotations for LinkContext and the XML processing classes.
@sbomer
sbomer requested a review from marek-safar as a code owner September 2, 2021 21:24
@sbomer
sbomer requested a review from vitek-karas September 2, 2021 21:24
Comment thread src/linker/Linker/LinkContext.cs Resolved
- Use null check instead of assert
- Add NotNullWhen annotation
@sbomer
sbomer merged commit 39505a8 into dotnet:main Sep 3, 2021
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
* Nullable annotations part 1

Enable nullable annotations for LinkContext and the XML processing classes.


Commit migrated from dotnet/linker@39505a8
sbomer added a commit to dotnet/runtime that referenced this pull request Jun 19, 2024
The resolution cache is shared between `Resolve` and
`TryResolve`, so we should call `ReportUnresolved` from `Resolve`
when we see a cached null result (that could have been cached
during `TryResolve`). Should make no difference to supported
scenarios because we always run with `IgnoreUnresolved` `true`.

This was regressed in
dotnet/linker#2253.

---------

Co-authored-by: Jackson Schuster <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants