This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
Improve test failure message when a fatal linker error exception happens - #2331
Merged
marek-safar merged 1 commit intoNov 3, 2021
Conversation
When a test hits a `LinkerFatalErrorException` the test will fail with the following error ``` The linked output assembly was not found. Expected at C:\Unity\dev\unity-monolinker-2\artifacts\testcases\illink\Attributes\GenericEnumInAttribute\... The linked output assembly was not found. Expected at C:\Unity\dev\unity-monolinker-2\artifacts\testcases\illink\Attributes\GenericEnumInAttribute\output\test.exe Expected: True But was: False ``` This is not helpful and is very confusing. Instead, when running tests, rethrow the `LinkerFatalErrorException` so that the tests correctly report an error. Ex: ``` Mono.Linker.LinkerFatalErrorException : ILLink: error IL1005: Mono.Linker.Tests.Cases.Attributes.GenericEnumInAttribute.Main(): Error processing method 'Mono.Linker.Tests.Cases.Attributes.GenericEnumInAttribute.Method()' in assembly 'test.exe' ----> System.NotImplementedException : GenericInst at Mono.Linker.Steps.MarkStep.ProcessQueue() in C:\Unity\dev\unity-monolinker-2\src\linker\Linker.Steps\MarkStep.cs:line 515 ```
mrvoorhe
force-pushed
the
master-improve-error-when-fatal-linker-exception
branch
from
October 26, 2021 13:06
15a39bb to
40ae985
Compare
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
…ens (dotnet/linker#2331) Commit migrated from dotnet/linker@e884052
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a test hits a
LinkerFatalErrorExceptionthe test will fail with the following errorThis is not helpful and is very confusing.
Instead, when running tests, rethrow the
LinkerFatalErrorExceptionso that the tests correctly report an error. Ex: