You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
testing: expectDiagnostics() should provide an option to ignore ordering #5818
Code churn can easily cause diagnostics to appear in changing orders over time, and this should, in general, not be considered a breaking change.
However, library tests that use this helper function will fail when diagnostic order changes.
It's onerous for every library test author to have to add a wrapper to pre-sort the collections; rather the core library should have a mode that enables this with a simple binary switch, as an addition to the options object.
The existing strict option could be used, but that would technically be a behavioral breaking change to the test condition.
That would be nice but I think in general it would be better practice to make sure your test only emit a single diagnostic.
Not doing order makes it also potentially harder to see what isn't matching(would just be able to say didn't find this exect diagnostic in this list).
Activity
timotheeguerin commentedon Jan 30, 2025
That would be nice but I think in general it would be better practice to make sure your test only emit a single diagnostic.
Not doing order makes it also potentially harder to see what isn't matching(would just be able to say didn't find this exect diagnostic in this list).
markcowl commentedon Feb 3, 2025
Have expectDiagnostics sort the diagnostics
harlanenciso112 commentedon May 23, 2025
I would like to work on this
zVapor-Dev commentedon Nov 20, 2026
I'd like to work on this since pr #7453 was closed.