Improve testing related to tracer / dependency tracking
- Dominant language
- C#
- Stars
- 392
- Forks
- 128
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
As we create more tools for investigating size after trimming to answer "why is this kept/not kept," it's crucial to improve tracing / dependency tracking. Right now, we only have the most basic testing and there are lots of methods in MarkStep that start with `if (Annotations.IsMarked(thing)) return;` without tracking the dependency passed in. This early return helps performance of linking but will only mark with a single reason, and will lead people to believe that if they remove the first dependency, they'll be able to remove `thing`, even if it's not true.
My first thought is to replace KeptAttribute with `KeptByAttribute(string MetadataProvider, DependencyKind)` to indicate an item should be marked by a specific type/method and a specific reason. I've found a couple places where an item was marked as expected, but due to unrelated/buggy logic, and hopefully this would help catch it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.