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

BuildInfo plugin can‘t work with scala 3 -Yexplicit-nulls option. #2831

Closed
yankun1992 opened this issue Oct 8, 2023 · 1 comment · Fixed by #2838
Closed

BuildInfo plugin can‘t work with scala 3 -Yexplicit-nulls option. #2831

yankun1992 opened this issue Oct 8, 2023 · 1 comment · Fixed by #2838
Milestone

Comments

@yankun1992
Copy link
Contributor

mill version: 0.11.5
error:

[error] -- [E008] Not Found Error: ...\BuildInfo.scala:12:25
[error] 12 |    buildInfoInputStream.close()
[error]    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]    |    value close is not a member of java.io.InputStream | Null.
[error]    |    Since explicit-nulls is enabled, the selection is rejected because
[error]    |    java.io.InputStream | Null could be null at runtime.
[error]    |    If you want to select close without checking for a null value,
[error]    |    insert a .nn before .close or import scala.language.unsafeNulls.
@lolgab
Copy link
Member

lolgab commented Oct 11, 2023

As a workaround, you can add the buildinfo plugin to a separate module that is used only for that and doesn't have the -Yexplicit-nulls option. Then you can depend on that module using moduleDeps.

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

Successfully merging a pull request may close this issue.

3 participants