-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Discourage using explicit package references to ILCompiler to publish #74591
Conversation
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
I am wondering whether we should kill the feature that automatically turns on PublishAot when the package is explicitly references. It would steer people towards just using the PublishAot property. Thoughts? |
Co-authored-by: Jan Kotas <[email protected]>
I like that that but that would break any existing usage of that pattern from 7.0 onwards. The warning text in this change would only be triggered when |
I think it is ok. People are going to quickly learn that the package reference alone does not do anything. If we want to do this, it would be nice to get this into 7.0 to avoid 7.0->8.0 breaking change around what the package reference does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, LGTM.
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2948185603 |
@LakshanF an error occurred while backporting to release/7.0, please check the run log for details! Error: @LakshanF is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=LakshanF |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2950238449 |
@LakshanF an error occurred while backporting to release/7.0, please check the run log for details! Error: @LakshanF is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=LakshanF |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2950265406 |
@danmoseley backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Show a warning when an explicit package reference to ILCompiler is added
Applying: Apply suggestions from code review
Applying: Fix issue 27239
Applying: Apply suggestions from code review
Applying: exclude the warning for direct targets file invoke cases
Using index info to reconstruct a base tree...
M src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
CONFLICT (content): Merge conflict in src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0005 exclude the warning for direct targets file invoke cases
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
…dotnet#74591) * Show a warning when an explicit package reference to ILCompiler is added * Apply suggestions from code review Co-authored-by: Jan Kotas <[email protected]> * Fix issue 27239 * Apply suggestions from code review Co-authored-by: Sven Boemer <[email protected]> * exclude the warning for direct targets file invoke cases Co-authored-by: Jan Kotas <[email protected]> Co-authored-by: Sven Boemer <[email protected]>
…#74591) (#74769) * Show a warning when an explicit package reference to ILCompiler is added * Apply suggestions from code review Co-authored-by: Jan Kotas <[email protected]> * Fix issue 27239 * Apply suggestions from code review Co-authored-by: Sven Boemer <[email protected]> * exclude the warning for direct targets file invoke cases Co-authored-by: Jan Kotas <[email protected]> Co-authored-by: Sven Boemer <[email protected]> Co-authored-by: Jan Kotas <[email protected]> Co-authored-by: Sven Boemer <[email protected]>
Fixes #74387 and dotnet/sdk#27239
Publishing a
NativeAOT
application is supported via the SDK and the 'old' unsupported way that we started via adding explicit package reference is discouraged. The explicit support is for very narrow scenarios like getting the latest fix on native AOT issues before the SDK exposes the fix via its officialILCompiler
packages.We also no longer support publishing an AOT application if the SDK property,
PublishAOT
, is not set and only the explicit package reference exists. We allowed this behavior (noPublishAOT
specified) early in 7.0 when SDK support was not enabled but do not want to continue to support the old way now. SDK path is the only we way want to support except for the narrow scenario described above wherePublishAOT
is still required for that scenario to work.