Skip to content

Support revisions on global commands #31

@RalfJung

Description

@RalfJung
Collaborator

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.

Activity

oli-obk

oli-obk commented on Nov 28, 2022

@oli-obk
Owner

We could require //@[revision]~ foo if you want to use revisions

RalfJung

RalfJung commented on Nov 28, 2022

@RalfJung
CollaboratorAuthor

That feels odd, I associate @ with global commands and ~ with patterns.

oli-obk

oli-obk commented on Nov 28, 2022

@oli-obk
Owner

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 case

RalfJung

RalfJung commented on Nov 28, 2022

@RalfJung
CollaboratorAuthor

I forgot, do we even still have the no-error-level syntax?

oli-obk

oli-obk commented on Nov 28, 2022

@oli-obk
Owner

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

RalfJung commented on Nov 28, 2022

@RalfJung
CollaboratorAuthor

Right so the only question is if we want to incur all that churn for when/if rustc itself uses this crate.

oli-obk

oli-obk commented on Nov 28, 2022

@oli-obk
Owner

Right so the only question is if we want to incur all that churn for when/if rustc itself uses this crate.

I can incrementally move the rustc test suite to use the same syntax to keep the final diff small

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@oli-obk

      Issue actions

        Support revisions on global commands · Issue #31 · oli-obk/ui_test