-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
From what I could tell, revisions are currently only supported on error patterns. Would be nice to also support them on global commands, so that one can do things like
//@revisions: isolated free
//@only-target-linux
//[free]@compile-flags: -Zmiri-disable-isolation
FWIW I would have probably picked this syntax
//@revisions: isolated free
//@only-target-linux
//@[free]compile-flags: -Zmiri-disable-isolation
but that would be inconsistent with //[fn_ptr]~^ ERROR: pattern
... maybe we should change that to //~[fn_ptr]^ ERROR: pattern
, too, so that the first character after the //
always indicates what this is?
OTOH, that might create parsing ambiguities if there is no ERROR level, and //[revision]
is also consistent, so... whatever.
Metadata
Metadata
Assignees
Labels
No labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
oli-obk commentedon Nov 28, 2022
We could require
//@[revision]~ foo
if you want to use revisionsRalfJung commentedon Nov 28, 2022
That feels odd, I associate
@
with global commands and~
with patterns.oli-obk commentedon Nov 28, 2022
considering square brackets in diagnostics are rare and you could always use a longer or regex pattern in that case (and get an error if that
[revision]
is not actually a revision), I think we should just use the possibly ambigous caseRalfJung commentedon Nov 28, 2022
I forgot, do we even still have the no-error-level syntax?
oli-obk commentedon Nov 28, 2022
oh haha, no I scrapped that and added a global min-level flag to get the "don't require annotaitons for all notes" behaviour. Ok no ambiguity, woo
RalfJung commentedon Nov 28, 2022
Right so the only question is if we want to incur all that churn for when/if rustc itself uses this crate.
oli-obk commentedon Nov 28, 2022
I can incrementally move the rustc test suite to use the same syntax to keep the final diff small