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

Investigate necessary changes for .NET 6.0 #24

Closed
thomaslevesque opened this issue Oct 15, 2021 · 1 comment · Fixed by #25
Closed

Investigate necessary changes for .NET 6.0 #24

thomaslevesque opened this issue Oct 15, 2021 · 1 comment · Fixed by #25

Comments

@thomaslevesque
Copy link
Owner

thomaslevesque commented Oct 15, 2021

In .NET 6.0, Linq introduces a few new methods that could conflict with Linq.Extras methods or render them obsolete.

Hopefully avoid reproducing the issues that happened with ToHashSet (#19, #22)...

@thomaslevesque
Copy link
Owner Author

Here's the plan:

  • add a new net6.0 TFM
  • for Linq.Extras methods that are being introduced in .NET 6.0 with the same name and signature, remove the this modifier in the net6.0 TFM. This way the methods won't cause ambiguous calls (avoiding Ambiguous call for ToHashSet #19), but they will still be callable at runtime (avoiding [Runtime Error] MissingMethodException caused by using ToHashSet method #22). And they will still be available to older target frameworks
  • Batch will be kept as is, but marked obsolete in the net6.0 TFM
  • The new ExceptBy and IntersectBy methods in .NET 6.0 don't actually have the same signature as the ones in Linq.Extras. They accept a sequence of TKey as the second parameter, instead of a sequence of TSource. So they don't do exactly the same thing. These methods can be kept in Linq.Extras without causing conflicts.
  • Bring back the ToHashSet, Append and Prepend methods that were removed to fix [Runtime Error] MissingMethodException caused by using ToHashSet method #22, since we now have a way to keep them without breaking things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant