Skip to content

Revert "Add GroupJoin overload returning IGrouping"#126624

Merged
danmoseley merged 2 commits intomainfrom
revert-121999-copilot/add-tuple-return-overload
Apr 8, 2026
Merged

Revert "Add GroupJoin overload returning IGrouping"#126624
danmoseley merged 2 commits intomainfrom
revert-121999-copilot/add-tuple-return-overload

Conversation

@MichalStrehovsky
Copy link
Copy Markdown
Member

Reverts #121999

This was merged during CI outage.

src\libraries\System.Linq.AsyncEnumerable\tests\JoinTests.cs(222,32): error CS0411: (NETCORE_ENGINEERING_TELEMETRY=Build) The type arguments for method 'AsyncEnumerable.Join<TOuter, TInner, TKey>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter, TKey>, Func<TInner, TKey>, IEqualityComparer<TKey>?)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reverts the recently-added GroupJoin overloads that returned IGrouping<,> (and their associated test coverage) from System.Linq, System.Linq.Queryable, and System.Linq.AsyncEnumerable, restoring the previous API surface after CI-discovered compilation issues.

Changes:

  • Remove GroupJoin<TOuter,TInner,TKey>(...) -> IEnumerable/IQueryable/IAsyncEnumerable<IGrouping<...>> overloads from implementations and ref assemblies.
  • Delete the corresponding unit tests that validated the removed overloads.
  • Remove now-unused helper grouping types (GroupJoinGrouping, AsyncGroupJoinGrouping) and related using System.Collections; directives.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/libraries/System.Linq/tests/GroupJoinTests.cs Removes tests targeting the reverted GroupJoin overload without a result selector.
src/libraries/System.Linq/src/System/Linq/GroupJoin.cs Removes the GroupJoin overload returning IGrouping<,> plus its iterator and helper grouping type.
src/libraries/System.Linq/ref/System.Linq.cs Removes the ref declaration for the reverted GroupJoin overload.
src/libraries/System.Linq.Queryable/tests/GroupJoinTests.cs Removes tests targeting the reverted Queryable.GroupJoin overload without a result selector.
src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs Removes the Queryable.GroupJoin overload returning IQueryable<IGrouping<,>>.
src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs Removes the ref declaration for the reverted Queryable.GroupJoin overload.
src/libraries/System.Linq.AsyncEnumerable/tests/GroupJoinTests.cs Removes tests targeting the reverted AsyncEnumerable.GroupJoin overloads returning IGrouping<,>.
src/libraries/System.Linq.AsyncEnumerable/src/System/Linq/GroupJoin.cs Removes the AsyncEnumerable.GroupJoin overloads returning IGrouping<,> plus the helper grouping type.
src/libraries/System.Linq.AsyncEnumerable/ref/System.Linq.AsyncEnumerable.cs Removes the ref declarations for the reverted AsyncEnumerable.GroupJoin overloads.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-linq
See info in area-owners.md if you want to be subscribed.

@github-actions

This comment has been minimized.

@danmoseley danmoseley enabled auto-merge (squash) April 8, 2026 03:57
@MichalStrehovsky
Copy link
Copy Markdown
Member Author

We still have a build break. Seems like this is not the only PR in the area path that @eiriktsarpalis merged with /ba-g without running any tests. The other one is #121998. I cannot do a revert of that one from github UI because "Sorry, this pull request couldn’t be reverted automatically. It may have already been reverted, or the content may have changed since it was merged." I assume because these PRs depend on each other.

So I've pushed out a git revert 2916d73755eb875a8803dfbb4d3a72a29cc6bd9b too.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Note

This review was generated by Copilot.

🤖 Copilot Code Review — PR #126624

Holistic Assessment

Motivation: Justified. PRs #121999 (GroupJoin IGrouping<,> overloads) and #121998 (Join/LeftJoin/RightJoin tuple overloads) were merged during a CI outage and introduced a CS0411 type inference ambiguity build error. Reverting both to restore a known-good state on main is the correct response.

Approach: Two clean git revert commits that exactly invert the original additions. All public API surface, implementations, internal helper types, and tests are removed across System.Linq, System.Linq.Queryable, and System.Linq.AsyncEnumerable with no residual artifacts.

Summary: ✅ LGTM. Both reverts are complete and clean. All added surface from #121999 and #121998 is fully removed with no dangling references. The pre-existing overloads (with resultSelector parameters) remain intact and unchanged. The CS0411 build error cited in the PR description is addressed by the second commit's revert of the tuple-returning Join overloads.


Detailed Findings

✅ Revert Completeness — Both PRs fully reverted

Verified that both reverts remove all artifacts:

Commit 1 (796ef57c) — Reverts #121999 (GroupJoin IGrouping overloads):

  • 3 ref assemblies updated: removed GroupJoin<TOuter,TInner,TKey> declarations
  • 3 src files: removed public methods, private iterators, and internal helper classes (GroupJoinGrouping, AsyncGroupJoinGrouping)
  • 3 test files: removed all tests for the reverted overloads

Commit 2 (51a2eb51) — Reverts #121998 (Join/LeftJoin/RightJoin tuple overloads):

  • 3 ref assemblies updated: removed tuple-returning Join, LeftJoin, RightJoin declarations
  • 6 src files (Join.cs, LeftJoin.cs, RightJoin.cs × 2 libraries): removed public methods and private iterators
  • 6 test files: removed all TupleJoin*, TupleLeftJoin*, TupleRightJoin* tests

Confirmed zero remaining references to GroupJoinGrouping, AsyncGroupJoinGrouping, TupleJoin, TupleLeftJoin, or TupleRightJoin in the affected libraries.

✅ No Collateral Damage — Existing overloads untouched

The original resultSelector-based overloads for Join, GroupJoin, LeftJoin, and RightJoin are preserved identically in all three libraries (System.Linq: 5+3+5+5 public methods; AsyncEnumerable: 3+3+3+3 public methods). All existing tests for those overloads are retained. No csproj files were modified — file additions/removals were all within existing source files.

✅ Build Error Addressed — CS0411 resolved

The cited CS0411 error (AsyncEnumerable.Join<TOuter, TInner, TKey> type arguments cannot be inferred) was caused by the tuple-returning Join overloads creating an ambiguity with the resultSelector-based overloads when the compiler attempted type inference. The second commit reverting #121998 directly addresses this.

💡 PR Title and Description — Slightly outdated

The PR title says "Revert 'Add GroupJoin overload returning IGrouping'" and the description only mentions reverting #121999, but the PR now also reverts #121998 (Join/LeftJoin/RightJoin tuple overloads). Consider updating the title/description to reflect both reverts for clarity in the git history.

Generated by Code Review for issue #126624 ·

@MichalStrehovsky
Copy link
Copy Markdown
Member Author

/ba-g wasm legs are broken everywhere, this is unlikely to make them worse since it's a clean revert. the build break is gone.

@danmoseley danmoseley merged commit 14eeb75 into main Apr 8, 2026
84 of 94 checks passed
@danmoseley danmoseley deleted the revert-121999-copilot/add-tuple-return-overload branch April 8, 2026 07:34
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants