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

[DO NOT MERGE]: IKeyValueCollection as IReadOnlyList #874

Conversation

kronic
Copy link
Contributor

@kronic kronic commented Mar 6, 2024

Implement IKeyValueCollection as IReadOnlyList

@dwcullop
Copy link
Member

dwcullop commented Mar 9, 2024

Please add some description to your PR (describe what you are changing and why). It doesn't have to be long, but it is for posterity.

@JakenVeina
Copy link
Collaborator

JakenVeina commented Mar 10, 2024

Looks like the build failures are complaining about calling LINQ methods on objects that now support direct calls (E.G. .Count() versus .Count), and only in Tests code. Another case of the analyzers being overly-aggressive, probably, but should be an easy fix. Do those errors not show up on your end?

@dwcullop
Copy link
Member

Looks like the build failures are complaining about calling LINQ methods on objects that now support direct calls (E.G. .Count() versus .Count), and only in Tests code. Another case of the analyzers being overly-aggressive, probably, but should be an easy fix. Do those errors not show up on your end?

I'm guessing he might not if he's using ReSharper and not VS. The build failures on the server can show what changes need to be made.

@glennawatson
Copy link
Member

Rider will have the same build errors as VS. The analysers work on both. Use rider all the time.

@kronic
Copy link
Contributor Author

kronic commented Mar 11, 2024

@dwcullop @glennawatson @JakenVeina ready for review

Copy link
Collaborator

@JakenVeina JakenVeina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to drop the two members on IKeyValueCollection instead of having them shadow the inherited ones.

There's also now a test failure happening, coming from the fact that you changed a public API within the library. The way this works is that the test runs code from the third-party library PublicAPIGenerator, which reflects upon the entire library and dumps a reproducible text version of every publicly-accessible type and member it finds into a text file. Then we call on the XUnit.Verify package to compare that file against the last-known-good file embedded within the project. If they're different at all, the test fails, and what SHOULD happen is that you should get prompted with a side-by-side diff of these files, for you accept changes into the last-known-good file. This last bit is very environment-dependent. For me on Windows, for example, it launches WinMerge with the two files.

If you're not getting any prompt to compare the diffs and accept them as changes to the API file, you can just edit the file directly. The file can be found at \src\DynamicData.Tests\API\ApiApprovalTests.DynamicDataTests.DotNet8_0.verified.txt, and the generated file to compare against should be right next to it, it's just not checked into the repository.

This is all an extra bit of clerical work that helps everyone make sure there aware of when breaking changes are occurring. In this case, we already have breaking changes merged into main, so the next release will have to be a new major version, so pulling this shouldn't be an issue, especially since it's only binary-breaking, not compile-breaking. @RolandPheasant agree?

If you'd rather one of us make the rest of the changes, I'd be completely fine with that. I'm not sure if the branch has been setup to receive commits from upstream maintainers.

src/DynamicData/Cache/IKeyValueCollection.cs Outdated Show resolved Hide resolved
@kronic
Copy link
Contributor Author

kronic commented Mar 12, 2024

@JakenVeina done

@JakenVeina JakenVeina added enhancement breaking change Items that contain a breaking change to the codebase labels Mar 13, 2024
@RolandPheasant
Copy link
Collaborator

@JakenVeina let's hold back a couple weeks on merging this, so we can apply other breaking changes as part of a big version release.

@RolandPheasant RolandPheasant changed the title IKeyValueCollection as IReadOnlyList [DO NOT MERGE]: IKeyValueCollection as IReadOnlyList Mar 20, 2024
@kronic
Copy link
Contributor Author

kronic commented May 2, 2024

@RolandPheasant ping

@RolandPheasant RolandPheasant merged commit cec559b into reactivemarbles:main Jun 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Items that contain a breaking change to the codebase enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants