dotnet / dotnet/linker

Consider a global analyzer view for internal call chains and only annotate at the top level

Open
#2,740 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

From the PR [conversation](https://github.com/dotnet/runtime/pull/67841#discussion_r847474012),

`And to me it seems flawed there, too. If I have a call A->B->C->D, I annotate A as "unconditionally suppress this diagnostic", and B/C/D are only reachable from A, it seems wrong to me that we then still require the developer to annotate B/C/D in order to avoid warnings. I'm trying to understand if there's a good technical argument for requiring the developer to still do that busy work and we fundamentally believe it's important that they should, or if this is a technical limitation where we'd like to avoid their having to do it but we can't (or can't yet).
`

Although there is some value in each API declaring via annotation some challenges it has with its execution environment (ex. platform specific like only works on Windows or calls a method that relies on runtime code generation and therefore not suitable for native aot application), it can get tedious for developers to annotate their library on all internal call chain nodes when its suppressed on a top level node (generally at public API level). In these cases, it should be only annotated at the top node.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.