Add a test for attribute removal using wildcard and lazy loading#1705
Conversation
Currently this doesn't work as it should, the test is to cover the scenario - once we fully implement lazy loading this should be fixed.
|
Didn't we decide that the wildcard was only supported for corelib? #1675 intentionally removed support for |
|
Good point - that basically means there's no way to write a test for it, right? (I can't fake corelib) Also - this pretty much means that the LinkerAttributeRemoval test should not work, right? So how come it's passing? |
|
It's a bit of a hack, but I managed to write a test that mocks corelib: https://github.com/mono/linker/pull/1675/files#diff-6bc3fb243979b37206fe4be289fcc1c77b1b6ec8173e7e63a090603639dd7c75R20. It fails PeVerify because system types can't be resolved, but it does check the attribute removal in other assemblies. As to why the test is passing - I just noticed it's actually not using embedded xml. :) SetupLinkAttributesFile will use the command-line xml. |
|
Good point about the file not being embedded - in that case the test is perfectly valid, right? |
|
Right, good point. And it's a good test to have, since I have been focusing mostly on the embedded XML. The "embedded" part threw me off. :) |
…net/linker#1705) Currently this doesn't work as it should, the test is to cover the scenario - once we fully implement lazy loading this should be fixed. Commit migrated from dotnet/linker@f4c577e
Currently this doesn't work as it should, the test is to cover the scenario - once we fully implement lazy loading this should be fixed.