Skip to content

Unknown -language option yields an error #20419

Closed
@WojciechMazur

Description

@WojciechMazur

Before 3.5 passing -language:higherKinds was simply ignored without any mesage, now, it's yielding a compilation error. This conflicts with handling of other unknown scalac options, which emit warnings.
The new behaviour is problematic when project use utilities to set common scalacOptions like https://github.com/typelevel/sbt-tpolecat - it requires to modify the upstream project and release it or to introduce a special exclusion rules in the build.

Compiler version

Last good release: 3.5.0-RC1-bin-20240512-99c4c00-NIGHTLY
First bad release: 3.5.0-RC1-bin-20240514-7c9aae3-NIGHTLY
Bisect points to: f6345c6

Minimized code

//> using options -language:higherKinds

@main def Test = ()

Output

[error] invalid choice(s) for -language: higherKinds
[info]   scalac -help  gives more information

Expectation

Unknown variant of option should yield warning instead of error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:settingsIssues tied to command line options & settings.area:uxIssues tied to user experience.itype:bugstat:needs decisionSome aspects of this issue need a decision from the maintainance team.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions