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

False warning about directives in multiple java files #1786

Closed
prolativ opened this issue Jan 17, 2023 · 0 comments · Fixed by #1796
Closed

False warning about directives in multiple java files #1786

prolativ opened this issue Jan 17, 2023 · 0 comments · Fixed by #1796
Assignees
Labels
bug Something isn't working

Comments

@prolativ
Copy link

Version(s)
0.1.19

Describe the bug
If the compiled sources contain more than one java file, a warning about using directives in multiple files is reported, even if there are no using directives in the source files.

To Reproduce

mkdir /tmp/bug-repro
cd /tmp/bug-repro
echo 'public class Foo {}' > Foo.java
echo 'public class Bar {}' > Bar.java
scala-cli compile .

This outputs:

[warn] ./Bar.java:1:1: Using directives detected in multiple files. It is recommended to keep them centralized in the /private/tmp/bug-repro/project.scala file.
[warn] public class Bar {}
[warn] ^
[warn] ./Foo.java:1:1: Using directives detected in multiple files. It is recommended to keep them centralized in the /private/tmp/bug-repro/project.scala file.
[warn] public class Foo {}
[warn] ^

Expected behaviour
Compilation should report no warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants