Skip to content

Conversation

@jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Dec 3, 2025

The test has a more complete explanation of this; witnesses on the FacetValue must have a canonical ordering.

@jonmeow jonmeow requested a review from a team as a code owner December 3, 2025 20:53
@jonmeow jonmeow requested review from chandlerc and removed request for a team December 3, 2025 20:53
@jonmeow jonmeow force-pushed the witnesses branch 2 times, most recently from 48e069c to 5a9efbb Compare December 3, 2025 20:56
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

LG, and really nice test to isolate this!

Comment inline is just confirming my understanding, no change needed.

CARBON_FATAL("Unhandled inst: {0}", inst);
}
}
llvm::sort(sortable, [](auto& lhs, auto& rhs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I expect that this is true, but figured I would check -- there can't be cases with the same specific interface IDs, and so this is a total order and not a partial order?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Identical specifics should be deduplicated (as an example, see above SortAndDeduplicate(required_interfaces_, RequiredLess);). That should happen during construction, and at this point we shouldn't need to deduplicate.

@jonmeow jonmeow enabled auto-merge December 3, 2025 22:30
@jonmeow jonmeow added this pull request to the merge queue Dec 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 3, 2025
@jonmeow jonmeow added this pull request to the merge queue Dec 4, 2025
Merged via the queue into carbon-language:trunk with commit 103c49a Dec 4, 2025
8 checks passed
@jonmeow jonmeow deleted the witnesses branch December 4, 2025 00:20
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.

2 participants