-
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
Add Microsoft.NET.ILLink package #82407
Conversation
Add Target to produce the ref part of illink
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr Issue DetailsAdd is Packable property to produce the lib part of illink
|
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<ServerGarbageCollection>true</ServerGarbageCollection> | ||
<AssemblyName>illink</AssemblyName> | ||
<Description>IL Linker</Description> | ||
<RootNamespace>Mono.Linker</RootNamespace> | ||
<IsPackable>true</IsPackable> |
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.
Make sure to add <IsShipping>false</IsShipping>
so we don’t ship this package to NuGet.
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.
Seems like this package is being shipped to Nuget by dotnet/linker (https://www.nuget.org/packages/Microsoft.NET.ILLink), I'm not sure if it's necessary for xamarin purposes though.
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.
If this package is already shipping, then we shouldn't mark it as non-shipping.
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.
That package should not be on public nuget.org and it was not until net8 p1. We are shipping it via internal feeds only, please remove it from nuget.org.
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.
cc @sbomer
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.
Looking into this
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.
I've requested for the package to be removed from nuget.
It sounds like we should also set IsPackable
IsShipping
to false here. Per @jkoritzinsky this means that it will be published to the dotnet8-transport
feed only (not the dotnet8
feed which is intended for packages that will eventually be published to nuget when we release). Consumers will need to make sure to use that feed as a nuget source. Does this sound ok @marek-safar?
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.
No, we need to keep the <IsPackable>true</IsPackable>
property. That indicates that the library is packable, i.e. it makes a dotnet pack
invocation work locally. If you set it to false, this library will never generate a package, neither locally nor on CI.
To control whether a library should be published to a transport feed but not to a stable feed (i.e. nuget.org), you want to use <IsShipping>false</IsShipping>
.
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.
🤦 sorry, I meant to write IsShipping
.
</PropertyGroup> | ||
|
||
<!-- The default pack logic will include the implementation assembly in lib. | ||
This also adds the reference assembly under ref. --> | ||
<Target Name="_AddReferenceAssemblyToPackage"> |
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.
@ViktorHofer - is there a reason why the ref
assemblies doesn't get added automatically?
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.
Reference assemblies aren't part of our core stack packages anymore since .NET 6. AFAIK this package needs the reference assembly, but it would be good to understand why.
…nes the reference files into a variable that can be used to add them to a package
This package should not be published to nuget. See #82407 (comment) for context.
Add is Packable property to produce the lib part of illink
Add Target to produce the ref part of illink
Adds logic to use API compat the way it was being used in dotnet/linker
Fixes xamarin/xamarin-macios#17518