Uh oh!
There was an error while loading. Please reload this page.
Remove dependencies on non-live illink - #91468
Conversation
jkoritzinsky
left a comment
There was a problem hiding this comment.
Can you take a look in targetingpacks.targets and update the KnownILLink item changes to point to the live ILLink?
sbomer
commented
Sep 1, 2023
I think we might be able to remove KnownILLinkPack entirely because we shouldn't be using the illink referenced by the SDK anywhere. Going to give this a try. |
Microsoft.Extensions.Options.SourceGeneration was enabling the single-file analyzer, but did not import illink.targets because it is not a source project. We could fix this by importing liveILLink.targets instead, but this introduces more problems with circular dependencies (generator projects depending on illink depending on generator projects).
There was a problem hiding this comment.
First of all: Amazing change!!
Slightly unrelated to this PR but still important from my point of view: Is there a feature flag that we can condition the illink.targets import on so that only project that actually use the linker, import the file and with it build the P2P to ILLink.Tasks.csproj?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This more closely matches the condition on the import of illink.targets. When EnableSingleFileAnalyzer is true, we should also import liveILLink.targets so that we get the live analyzer bits. Also address feedback about path separators.
This will make it easier to use different conditions for the two.
Some libraries test projects set PublishTrimmed, so they require the liveILLink.targets.
sbomer
commented
Sep 5, 2023
I'm looking for a clean way to do this, but I'm not sure of the best way yet.
|
This should let libraries projects (whether they are source or test projects) use the SDK's trimming properties with a live ILLink, enabling the ProjectReference only for those projects that need it. Because illink.targets also imports liveILLink.targets, this import is guarded by a property to ensure liveILLink.targets is only imported once on this path.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Fix indentation - Only import liveILLink.targets in libraries when illink.targets is imported - Respect MSBuildRuntimeType for live ILLinkTasksAssembly override Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit be50c35.
Various test configurations (wasm, nativeaot) rely on the live ILLink when running libraries tests.
ViktorHofer
commented
Oct 5, 2023
Looks like there is a remaining failure in the NativeAOT leg . |
This target isn't defined in the ILLink.Tasks.csproj ProjectReference. Try skipping nonexistent targets to fix this.
sbomer
commented
Oct 5, 2023
Failures are known (it seems browser-wasm job timed out but didn't report status back to github). I couldn't have got this through without your help @ViktorHofer and @jkoritzinsky - thank you! |
No description provided.