Skip to content

Breaking change in ResourceSet class #44483

Closed

Description

@sebastienros

This PR #44104 introduces a breaking change that is only experienced at runtime.
ResourceSet implements IEnumerable and ASP.NET Core is using the contract.

At least there, but other tests break so it might not be isolated.
https://github.com/dotnet/aspnetcore/blob/master/src/Localization/Localization/src/Internal/ResourceManagerStringProvider.cs#L75

While we could react to this change, it doesn't seem that this change of behavior was intentional.

Activity

  1. jkotas commented on Nov 10, 2020

    @jkotas
    Member

    Revert in #44482

  2. marek-safar commented on Nov 10, 2020

    @marek-safar
    Contributor

    @sebastienros what is the failure?

  3. sebastienros commented on Nov 10, 2020

    @sebastienros
    MemberAuthor

    I left all the details on the PR. To summarize ResourceSet implements IEnumerable but the returned elements are not of the same type. They were DictionaryEntry and now they are KeyValuePair<>.

  4. tarekgh commented on Nov 10, 2020

    @tarekgh
    Member

    @marek-safar here is @sebastienros comment regarding the failure #44104 (comment)

  5. marek-safar commented on Nov 10, 2020

    @marek-safar
    Contributor

    I see you are casting object to underlying type. That needs to be fixed on runtime side.

  6. tarekgh commented on Nov 10, 2020

    @tarekgh
    Member

    @marek-safar just to make sure you saw @jkotas PR reverting your change which broke this scenario #44482

  7. marek-safar commented on Nov 10, 2020

    @marek-safar
    Contributor

    Yep, let's revert this to unblock them. I'll fix that in follow up PR (revert)

  8. ghost locked as resolved and limited conversation to collaborators on Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions