Skip to content

Conversation

@philomates
Copy link
Collaborator

fixes #222

For example, with `(match? [#{2}] [#{1 2}])` it currently gives
`[#{(unexpected 1)} ...]`

This feels misleading to me because there aren't more elements in the
vector that are being elided.

It should be more like `[#{(unexpected 1) ...}]` or at worst
something like `[#{(unexpected 1) ...} ...]`
(if (or (vector? base-list)
(set? base-list))
lst
(reverse lst))))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

without this change we were turning a set into a list due to reverse

@philomates philomates changed the title Experimental ellision feature fix: Preserve metadata on sets to make it work with feature Experimental elision feature fix: Preserve metadata on sets to make it work with feature Jan 17, 2025
(:unmatched result)))
(:elements result))
::result/value
#(with-mismatch-meta % :mismatch-sequence)))))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add :mismatch-sequence metadata, which is used by the elision feature, to the result of any-order/set mismatch results

@philomates philomates merged commit 503aa5b into master Aug 20, 2025
2 checks passed
@philomates philomates deleted the fix-set-ellision branch August 20, 2025 08:39
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.

Case when enabling abbreviation results in no useful mismatch info

2 participants