Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple language features in scalacOptions not recognized #9719

Closed
oyvindberg opened this issue Sep 3, 2020 · 3 comments · Fixed by #9731
Closed

Multiple language features in scalacOptions not recognized #9719

oyvindberg opened this issue Sep 3, 2020 · 3 comments · Fixed by #9731
Milestone

Comments

@oyvindberg
Copy link

Apologies if this is a duplicate, but I couldnt find anything right away.

With 0.27.0-RC1 and sbt-dotty 0.4.2, my project had these scalacOptions

sbt:std> show scalacOptions
[info] * -bootclasspath
[info] * ...
[info] * -language:implicitConversions
[info] * -language:higherKinds
[info] * -language:existentials

This triggered the warnings about implicit conversions:

[warn] Flag -language set repeatedly
[warn] Flag -language set repeatedly
...
[warn] 42 |    def deleteType: Self = this.set("type", js.undefined)
[warn]    |                                            ^^^^^^^^^^^^
[warn]    |Use of implicit conversion method undefOr2jsAny in object | should be enabled
[warn]    |by adding the import clause 'import scala.language.implicitConversions'
[warn]    |or by setting the compiler option -language:implicitConversions.
[warn]    |See the Scala docs for value scala.language.implicitConversions for a discussion
[warn]    |why the feature should be explicitly enabled.

I eventually discovered the warnings about multiple language flags and tried the following:

sbt:std> show scalacOptions
[info] * -bootclasspath
[info] * ...
[info] * -language:implicitConversions,higherKinds,existentials

So that worked, but we might want to support the former way of passing multiple language feature flags as well

@som-snytt
Copy link
Contributor

som-snytt commented Sep 6, 2020

This ticket is duplicated by https://github.com/lampepfl/dotty-feature-requests/issues/107

@oyvindberg
Copy link
Author

Sure you got that link right @som-snytt ? It's true that part of my issue here was a few kilometers of implicit conversion warnings in the terminal during compilation, but it doesn't otherwise seem like the same issue.

@som-snytt
Copy link
Contributor

Sorry about that, corrected!

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

Successfully merging a pull request may close this issue.

3 participants