Skip to content

Make Definitions agree with the enum about tool order - #796

Merged
SimonCropp merged 1 commit into
mainfrom
fix-tool-order-disagreement
Aug 22, 2026
Merged

Make Definitions agree with the enum about tool order#796
SimonCropp merged 1 commit into
mainfrom
fix-tool-order-disagreement

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Both files carry a "keep in sync" comment and they had drifted in two places:
TortoiseMerge sat before the TortoiseGit pair in the enum and after it in
Definitions, and the enum had VisualStudio before Cursor while Definitions had
them the other way round.

That matters because the two lists are used for different things. The enum is
the default resolution order - OrderReader hands back Enum.GetValues - while the
generated docs and the remainder after a DiffEngine_ToolOrder prefix follow
Definitions. So the published order was not the order tools actually resolve in,
and a user reading the docs to pick a prefix was reading the wrong list.

Definitions moves to match the enum, since the enum is what actually decides.
Generated docs regenerated to match.

The test that exists to catch this could not: IsEquivalentTo is order
insensitive by default, so it passed on both lists. IsEqualTo is no good either

  • on two lists it compares references - so the assertion joins them, which is
    order sensitive and names the first tool that differs instead of reporting that
    the contents match.

Both files carry a "keep in sync" comment and they had drifted in two places:
TortoiseMerge sat before the TortoiseGit pair in the enum and after it in
Definitions, and the enum had VisualStudio before Cursor while Definitions had
them the other way round.

That matters because the two lists are used for different things. The enum is
the default resolution order - OrderReader hands back Enum.GetValues - while the
generated docs and the remainder after a DiffEngine_ToolOrder prefix follow
Definitions. So the published order was not the order tools actually resolve in,
and a user reading the docs to pick a prefix was reading the wrong list.

Definitions moves to match the enum, since the enum is what actually decides.
Generated docs regenerated to match.

The test that exists to catch this could not: IsEquivalentTo is order
insensitive by default, so it passed on both lists. IsEqualTo is no good either
- on two lists it compares references - so the assertion joins them, which is
order sensitive and names the first tool that differs instead of reporting that
the contents match.
@SimonCropp SimonCropp added this to the 20.0.0 milestone Aug 22, 2026
@SimonCropp
SimonCropp merged commit a09668a into main Aug 22, 2026
10 checks passed
@SimonCropp
SimonCropp deleted the fix-tool-order-disagreement branch August 22, 2026 00:42
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant