Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up dead code in ILCompiler targets #85618

Merged
merged 2 commits into from
May 3, 2023
Merged

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented May 1, 2023

  • The logic for referencing ILCompiler as an MSBuild SDK should no longer be needed because we use PackageReference.
  • IlcCalledViaPackage should always be true

@ghost
Copy link

ghost commented May 1, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details
  • The logic for referencing ILCompiler as an MSBuild SDK should no longer be needed because we use PackageReference.
  • IlcCalledViaPackage should always be true
Author: sbomer
Assignees: sbomer
Labels:

area-NativeAOT-coreclr

Milestone: -

@sbomer sbomer requested a review from LakshanF May 1, 2023 23:20
@@ -33,22 +31,22 @@
<IlcDynamicBuildPropertyDependencies>SetupProperties</IlcDynamicBuildPropertyDependencies>
</PropertyGroup>

<!-- If called via package instead of the SDK, update the runtime package version to match the build package -->
<ItemGroup Condition="'$(AotRuntimePackageLoadedViaSDK)' != 'true'">
<!-- Update the KnownILCompilerPack version to match the PackageReference, in case there's an explicit reference to a specific version. -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just drop this support.

Copy link
Member

@jkotas jkotas May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should drop it (at least not yet) - aspnet is relying on this for testing. cc @eerhardt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could support this by using RuntimeFrameworkVersion or setting the framework pack version. Agreed that we should update the docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm worried about with this configuration is that we're effectively splitting the framework with this config, namely the ref assemblies are from one version and the runtime assemblies are from another.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that has a problem which @jkotas pointed out (#84372 (comment)) - it also sets the aspnet framework version. I'm not sure whether that's by design. I think the real fix for this would be to have a property like RuntimeFrameworkVersion that only applies to the runtime version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm worried about with this configuration is that we're effectively splitting the framework with this config,

Yes, it has potential versioning issues. These versioning issues are rarely problem in practice. The only 100% reliable way to avoid these potential versioning issues is by waiting for fully coherent SDK build. that happens like once a month.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only 100% reliable way to avoid these potential versioning issues is by waiting for fully coherent SDK build. that happens like once a month.

I thought this was all done by targeting packs. Can we not engineer the SDK to pull the appropriate targeting pack based on a single property value? That is, you specify one version and it pulls a ref pack (if not locally available) from NuGet with that version, and then an ILCompiler pack the same way?

I suppose the alternative is to rely more on the VMR to accelerate the production of coherent SDK builds, which honestly doesn't sound too bad either.

Copy link
Member Author

@sbomer sbomer May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Providing one property to consistently control the version of runtime bits (and any tool/targeting packs that should version with runtime) would make sense to me, though I don't know much about the targeting packs.

@sbomer
Copy link
Member Author

sbomer commented May 3, 2023

Failures are known issues.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sbomer sbomer merged commit d3025ba into dotnet:main May 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 3, 2023
@sbomer sbomer deleted the ilcDeadCode branch November 3, 2023 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants