Closed
Description
With the fix for #2136, we will start producing warnings for reflection access to annotated members by DAMT on types, where the warning origin will be the annotated member itself. These warnings aren't always suppressible on the member itself.
Architectural limitations make this a bit hard to solve (or maybe I'm lacking some creativity - ideas welcome!):
- We need to warn for every potential access to the member (from DAMT annotated types in this case)
- We decide whether a warning is suppressed when generating it
- We only want to scan the member's attributes once
- And this should happen after marking the member "processed", otherwise it can trigger re-processing of the member leading to stack overflow.
- But at the point where we process methods we have lost information about what originally caused the method to be kept
I think this points to two possible changes that would fix the suppressions:
- When we unify the DependencyInfo/ScopeStack infrastructure we should try to track enough information to decide what kind of warnings to report
- We should consider not treating warnings suppressed until we are ready to emit them, as @agocke has suggested before