You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Add nullable annotations to reference assembly #2302
The custom step APIs in the linker's reference assembly should have nullable annotations. When I tried to enable them, ApiCompat produced errors about NullableContextAttribute that I'm not sure how to work around:
error : CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.NullableContextAttribute' exists on 'Mono.Linker.MessageOrigin..ctor(Mono.Cecil.IMemberDefinition, System.Nullable<System.Int32>)' in the contract but not the implementation. [/home/sven/linker/src/linker/Mono.Linker.csproj
I think this is happening because the compiler decides how to emit NullableContextAttribute based on which annotations are most common in a type, which could be different in the ref assembly.
For future reference, we also need to disable CS8597 to prevent warnings about "throw null" in the ref assembly.
Activity