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

Microsoft.NET.ILLink package is broken #82597

Closed
marek-safar opened this issue Feb 24, 2023 · 7 comments · Fixed by #82630
Closed

Microsoft.NET.ILLink package is broken #82597

marek-safar opened this issue Feb 24, 2023 · 7 comments · Fixed by #82630
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers

Comments

@marek-safar
Copy link
Contributor

Microsoft.NET.ILLink package is broken since we moved illink repo to dotnet/runtime. The package is missing dependency of Mono.Cecil which blocks consumption of this package.

Extracted illink.nuspec from https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.NET.ILLink/overview/8.0.0-preview.2.23123.8

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>Microsoft.NET.ILLink</id>
    <version>8.0.0-preview.2.23123.8</version>
    <authors>Microsoft</authors>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <icon>Icon.png</icon>
    <projectUrl>https://dot.net/</projectUrl>
    <description>IL Linker</description>
    <releaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</releaseNotes>
    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
    <serviceable>true</serviceable>
    <repository type="git" url="https://github.com/dotnet/runtime" commit="c72a060e67453703172be1f886b651f1f89de562" />
    <dependencies>
      <group targetFramework="net8.0" />
    </dependencies>
  </metadata>
</package>

Open question is if the dependency should be Mono.Cecil or Microsoft.DotNet.Cecil package.

@grendello @rolfbjarne

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 24, 2023
@marek-safar marek-safar added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Feb 24, 2023
@ghost
Copy link

ghost commented Feb 24, 2023

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

Issue Details

Microsoft.NET.ILLink package is broken since we moved illink repo to dotnet/runtime. The package is missing dependency of Mono.Cecil which blocks consumption of this package.

Extracted illink.nuspec from https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.NET.ILLink/overview/8.0.0-preview.2.23123.8

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>Microsoft.NET.ILLink</id>
    <version>8.0.0-preview.2.23123.8</version>
    <authors>Microsoft</authors>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <icon>Icon.png</icon>
    <projectUrl>https://dot.net/</projectUrl>
    <description>IL Linker</description>
    <releaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</releaseNotes>
    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
    <serviceable>true</serviceable>
    <repository type="git" url="https://github.com/dotnet/runtime" commit="c72a060e67453703172be1f886b651f1f89de562" />
    <dependencies>
      <group targetFramework="net8.0" />
    </dependencies>
  </metadata>
</package>

Open question is if the dependency should be Mono.Cecil or Microsoft.DotNet.Cecil package.

@grendello @rolfbjarne

Author: marek-safar
Assignees: -
Labels:

untriaged, area-Tools-ILLink

Milestone: -

grendello added a commit to dotnet/android that referenced this issue Feb 24, 2023
…7769)"

Context: dotnet/runtime#82597

This reverts commit 6cd0d38.

We need to do it because a recent update to the `Microsoft.NET.ILLink`
package broke our build:

   Microsoft.Android.Sdk.ILLink.csproj : error NU1202: Package Microsoft.NET.ILLink 8.0.0-preview.2.23123.5 is not compatible with net7.0 (.NETCoreApp,Version=v7.0). Package Microsoft.NET.ILLink 8.0.0-preview.2.23123.5 supports: net8.0 (.NETCoreApp,Version=v8.0)

This happened because the version of `Microsoft.NET.ILLink` that
we have configured in `en/Version.Details.xml` was removed from
the dotnet8 feed and the closest matching version is installed instead.

An attempt to fix it was to switch the `Microsoft.Android.Sdk.ILLink`
project back to `net8.0` but, alas, the new `Microsoft.NET.ILLink` package
version misses dependency on Cecil, also causing our build to fail:

   src/Microsoft.Android.Sdk.ILLink/ApplyPreserveAttribute.cs(9,12): error CS0234: The type or namespace name 'Cecil' does not exist in the namespace 'Mono'
   src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/LinkDesignerBase.cs(161,41): error CS0246: The type or namespace name 'MethodDefinition' could not be found
   ...
    626 Warning(s)
    359 Error(s)

Reverting 6cd0d38 puts as back on the `alpha1`
release of net8 and fixes the build until we have a real solution available.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 24, 2023
@sbomer
Copy link
Member

sbomer commented Feb 24, 2023

I'm adding a dependency on Microsoft.DotNet.Cecil in #82630. I believe this is the right choice because it's the officially supported version of the package, but it may require consumers in xamarin to also reference that package instead of Mono.Cecil. We didn't change any assembly or type names, so no code should need to be updated.

@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Feb 24, 2023
@rolfbjarne
Copy link
Member

@sbomer @marek-safar which feed is the Microsoft.DotNet.Cecil package in? I'm getting error NU1101: Unable to find package Microsoft.DotNet.Cecil

And these are the feeds we have right now:

    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
    https://pkgs.dev.azure.com/xamarin/public/_packaging/macios-dependencies/nuget/v3/index.json
    https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-3f6c45a2/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-531f715f/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-8c6bcad1/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-f2980ae1/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-15d285f3/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-d5edd29b-1/nuget/v3/index.json
    https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-2e45bc7a/nuget/v3/index.json

@marek-safar
Copy link
Contributor Author

It's now only available at transport feed (we should enable it to internal too @sbomer?)

Try to add this

https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json

@sbomer
Copy link
Member

sbomer commented Mar 2, 2023

By internal do you mean the dotnet8 feed? I think it should only go on the transport feed since the dotnet8 feed is intended for packages that will eventually make it to nuget.org. (Microsoft.NET.ILLink.Tasks, on the other hand, has to go to nuget.org so that the SDK can pull down the right version of ILLink based on the TFM).

@marek-safar
Copy link
Contributor Author

@sbomer I think it's worth double checking on this. I think Microsoft.NET.ILLink is available on dotnet8 feed but its dependencies are not, which feels odd.

@sbomer
Copy link
Member

sbomer commented Mar 2, 2023

It should no longer be published to dotnet8 after #82905.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants