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

[Breaking change]: ILVerify.IResolver takes AssemblyNameInfo parameters #41786

Closed
2 of 3 tasks
KalleOlaviNiemitalo opened this issue Jul 17, 2024 · 9 comments · Fixed by dotnet/runtime#106193
Closed
2 of 3 tasks
Assignees
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr This issue will be closed (fixed) by an active pull request. Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. source incompatible Source code may encounter a breaking change in behavior when targeting the new version.

Comments

@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Jul 17, 2024

Description

In the ILVerify.IResolver interface defined in the Microsoft.ILVerification package, the type of the first parameter of each method is now System.Reflection.Metadata.AssemblyNameInfo rather than System.Reflection.AssemblyName.

Version

.NET 9 Preview 5

Previous behavior

The type of the first parameter was System.Reflection.AssemblyName:

namespace ILVerify
{
    public interface IResolver
    {
        PEReader ResolveAssembly(AssemblyName assemblyName);
        PEReader ResolveModule(AssemblyName referencingAssembly, string fileName);
    }
}

New behavior

The type of the first parameter is System.Reflection.Metadata.AssemblyNameInfo:

namespace ILVerify
{
    public interface IResolver
    {
        PEReader ResolveAssembly(AssemblyNameInfo assemblyName);
        PEReader ResolveModule(AssemblyNameInfo referencingAssembly, string fileName);
    }
}

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

“Avoids dependency on AssemblyName.Culture and globalization (ICU)” (dotnet/runtime#102036)

Recommended action

If your application references the Microsoft.ILVerification package and defines a type that implements the ILVerify.IResolver interface, change the implementation to take AssemblyNameInfo parameters.

Feature area

SDK

Affected APIs

  • ILVerify.IResolver.ResolveAssembly
  • ILVerify.IResolver.ResolveModule

These methods are not overloaded.


Associated WorkItem - 292110

@KalleOlaviNiemitalo KalleOlaviNiemitalo added breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 labels Jul 17, 2024
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged binary incompatible Existing binaries may encounter a breaking change in behavior. source incompatible Source code may encounter a breaking change in behavior when targeting the new version. labels Jul 17, 2024
@KalleOlaviNiemitalo
Copy link
Author

@jkotas, I filed this because I maintain some code that implements the interface and will be broken by the change. Can you verify that the feature area is correct?

@jkotas
Copy link
Member

jkotas commented Jul 17, 2024

Looks good to me. Thank you!

@KalleOlaviNiemitalo
Copy link
Author

I tried to send email as instructed here

Finally, please email a link to this breaking change issue to [.NET Breaking Change Notifications](mailto:dotnetbcn@microsoft.com).

but my email was rejected.

@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Aug 1, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Aug 1, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Aug 1, 2024
@gewarren
Copy link
Contributor

gewarren commented Aug 7, 2024

@jkotas @adamsitnik I don't see this Microsoft.ILVerification package being indexed for the .NET API documentation. Should it be?

@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Aug 7, 2024
@jkotas
Copy link
Member

jkotas commented Aug 7, 2024

Microsoft.ILVerification is a package for specific very advanced users. We have number of packages like that. https://www.nuget.org/packages/Microsoft.Diagnostics.Runtime. is another package in this category.

APIs in these packages do not go through API reviews, they are not documented on https://learn.microsoft.com/, and we are more flexible with breaking changes in these packages compared to core .NET APIs. I think it is the right place to be. We want to keep these packages very low-cost.

If you think that it does not make sense to publish breaking changes in these packages as part of .NET release notes, I would be fine with that. We can find an alternative.

@gewarren
Copy link
Contributor

gewarren commented Aug 7, 2024

@PriyaPurkayastha What do you think👆?

@KalleOlaviNiemitalo
Copy link
Author

If this breaking change is not added to .NET release notes, I hope it will be in the package release notes instead. Currently, those only link to https://go.microsoft.com/fwlink/?LinkID=799421, which redirects to https://github.com/dotnet/core/tree/main/release-notes.

@gewarren gewarren assigned jkotas and unassigned gewarren Aug 8, 2024
@gewarren
Copy link
Contributor

gewarren commented Aug 8, 2024

Since these are undocumented APIs, it doesn't make sense to document a breaking change to a parameter type. I've assigned the issue to Jan in case you want to add it to the package release notes.

jkotas added a commit to jkotas/runtime that referenced this issue Aug 9, 2024
@jkotas
Copy link
Member

jkotas commented Aug 9, 2024

I hope it will be in the package release notes instead

We can do that: dotnet/runtime#106193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr This issue will be closed (fixed) by an active pull request. Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. source incompatible Source code may encounter a breaking change in behavior when targeting the new version.
Projects
None yet
4 participants