Skip to content

Sort Features with more user-defined options first, per spec#1267

Open
nozaq wants to merge 1 commit into
devcontainers:mainfrom
nozaq:fix-options-sort
Open

Sort Features with more user-defined options first, per spec#1267
nozaq wants to merge 1 commit into
devcontainers:mainfrom
nozaq:fix-options-sort

Conversation

@nozaq

@nozaq nozaq commented Jul 19, 2026

Copy link
Copy Markdown

The Features spec's "Installation Order" rules state that Features in a round are sorted by "Greatest number of user-defined options", but optionsCompareTo compared option counts ascending, installing the Feature with the fewest options first.

Flip the length comparison so the Feature with the greatest number of options sorts first, and update the round-sorting test expectations accordingly. Equal-length option sets still tie-break by key/value comparison as before.

fixes devcontainers/spec#755

The Features spec's "Installation Order" rules state that Features in a
round are sorted by "Greatest number of user-defined options", but
optionsCompareTo compared option counts ascending, installing the
Feature with the fewest options first.

Flip the length comparison so the Feature with the greatest number of
options sorts first, and update the round-sorting test expectations
accordingly. Equal-length option sets still tie-break by key/value
comparison as before.
@nozaq
nozaq requested a review from a team as a code owner July 19, 2026 07:04
@nozaq

nozaq commented Jul 19, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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 this pull request may close these issues.

CLI sorts Feature options fewest-first, against spec

2 participants