Skip to content

relax "scala identifier" syntax for keys, rename target.foo to if.foo #1959

@bishabosha

Description

@bishabosha

Is your feature request related to a problem? Please describe.
It is not so obvious that target actually runs like a filter that excludes some files, and can even change the behaviour of directive validation (warning for multiple files)

Describe the solution you'd like
pick a more obvious prefix for these kinds of keys, such as //> using if.scala.< "3.0.0", however if is a Scala keyword, so I assume would need to be allowed in the parser (why not allow more kinds of keys while we have the chance)

Describe alternatives you've considered
keep target and improve documentation of semantics.

Additional context
We should probably also improve documentation in general for when directives act as a "mode switch".

Discussed at the Scala Tooling Summit March 2023

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions