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

REPL reports unused import #18383

Closed
som-snytt opened this issue Aug 10, 2023 · 0 comments
Closed

REPL reports unused import #18383

som-snytt opened this issue Aug 10, 2023 · 0 comments

Comments

@som-snytt
Copy link
Contributor

Compiler version

3.3.0

Minimized code

➜  dotty git:(test/repl-unused) ./bin/scala -Wunused:all
Welcome to Scala 3.4.0-RC1-bin-SNAPSHOT-git-c90ad6b (20.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala> import collection.*
1 warning found
-- Warning: ------------------------------------------------------------------------------------------------------------
1 |import collection.*
  |                  ^
  |                  unused import

scala>

Expectation

It's obvious that in REPL, the compiler should not warn on "bare import". (Maybe it's sufficient for compiler not to warn in a compilation unit consisting only of imports.)

It would be nice if REPL never warned on spurious synthetic imports. Not sure if Scala 3 already fixed that issue.

Many build.sbt have cruft to disable warnings in console as a workaround.

@som-snytt som-snytt added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:repl and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Aug 10, 2023
@Gedochao Gedochao assigned sjrd and unassigned szymon-rd Apr 5, 2024
@sjrd sjrd closed this as completed in 509c235 May 2, 2024
WojciechMazur added a commit that referenced this issue Jul 6, 2024
… the repl." to LTS (#21092)

Backports #20310 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants