-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,42 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<ServerGarbageCollection>true</ServerGarbageCollection> | ||
<AssemblyName>illink</AssemblyName> | ||
<Description>IL Linker</Description> | ||
<RootNamespace>Mono.Linker</RootNamespace> | ||
<IsPackable>true</IsPackable> | ||
<PackageId>Microsoft.NET.ILLink</PackageId> | ||
<!-- Disabling baseline validation since this is a brand new package. | ||
Once this package has shipped a stable version, the following line | ||
should be removed in order to re-enable validation. --> | ||
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation> | ||
<!-- There are currently no translations, so the satellite assemblies are a waste of space. --> | ||
<EnableXlfLocalization>false</EnableXlfLocalization> | ||
<NoWarn Condition="'$(DotNetBuildFromSource)' == 'true'">$(NoWarn);CS8524</NoWarn> | ||
<ContractProject>$(MSBuildThisFileDirectory)ref\Mono.Linker.csproj</ContractProject> | ||
<RollForward>Major</RollForward> | ||
<UseAppHost>false</UseAppHost> | ||
<NoWarn>$(NoWarn);NU5131</NoWarn> | ||
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddReferenceAssemblyToPackage</TargetsForTfmSpecificContentInPackage> | ||
</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 commentThe reason will be displayed to describe this comment to others. Learn more. @ViktorHofer - is there a reason why the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
<!-- Get the build output of the reference project, which has been built due to the ProjectReference. --> | ||
<MSBuild Projects="$(ContractProject)" Targets="BuiltProjectOutputGroup" Properties="TargetFramework=$(TargetFramework)"> | ||
<Output TaskParameter="TargetOutputs" ItemName="_ReferenceAssemblies" /> | ||
</MSBuild> | ||
<!-- Check just to be safe. --> | ||
<Error Condition="!Exists('%(_ReferenceAssemblies.Identity)')" Text="Reference assembly %(Identity) does not exist. Ensure it has been built before packaging." /> | ||
<!-- Add it to the package. --> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="@(_ReferenceAssemblies)" PackagePath="ref\$(TargetFramework)" /> | ||
</ItemGroup> | ||
tlakollo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Target> | ||
|
||
<ItemGroup> | ||
<AdditionalFiles Include="BannedSymbols.txt" /> | ||
<Compile Remove="ref\**\*.cs" /> | ||
|
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 thedotnet8-transport
feed only (not thedotnet8
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 adotnet 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
.