dotnet / dotnet/linker

Warnings and errors should include more context when possible

Open
#1,153 3 comments 0 reactions 0 assignees View on GitHub
area-Linker: Diagnostic enhancement
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

As we surface linker warnings/errors to users (see https://github.com/mono/linker/pull/1105 for example), we should revisit the messages to include more context when reasonable, and ensure that they convey the right amount of information.

For example:
- Errors about unresolved things in XML descriptors should at least say which descriptor had the error, and maybe even report the element (or XML line number if we can get it) that caused it. Currently we silently move on when a [type doesn't resolve](https://github.com/mono/linker/blob/dff175e3758610101deaa2cc6f106078892971b0/src/linker/Linker.Steps/ResolveFromXmlStep.cs#L185) for example.
- The unrecognized reflection [messages](https://github.com/mono/linker/blob/dff175e3758610101deaa2cc6f106078892971b0/test/Mono.Linker.Tests.Cases/DataFlow/LocalDataFlow.cs#L64) are pretty verbose - we may want to include less information in the default message as long as there is a way to get more context.

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.