-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Warning: @deprecated("Use JavaTests instead", since = "Mill 0.11.10") #3371
Milestone
Comments
Same here. I reverted to 0.11.9 for now. |
lolgab
pushed a commit
to lolgab/mill
that referenced
this issue
Aug 20, 2024
…ihaoyi#3379) Fixes com-lihaoyi#3371 The direct problem is that we are generating code with resolved type aliases, resulting in the `JavaTests` aliases being resolved to deprecated `JavaModuleTests` traits. However, in general generated code should probably not display warnings at all, so better to just slap `@nowarn` on the whole chunk rather than trying to fix the immediate alias resolution problem
lolgab
added a commit
that referenced
this issue
Aug 20, 2024
#3400) Fixes #3371 The direct problem is that we are generating code with resolved type aliases, resulting in the `JavaTests` aliases being resolved to deprecated `JavaModuleTests` traits. However, in general generated code should probably not display warnings at all, so better to just slap `@nowarn` on the whole chunk rather than trying to fix the immediate alias resolution problem Pull Request: #3400 Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I just upgraded to mill 0.11.11, and see a warning for
trait JavaModuleTests in trait JavaModule is deprecated
even though our project isn't using that deprecated trait (JavaModuleTests
).I also saw this warning in a recent issue (#3359 (comment)), so I figured the warning may come from mill itself.
I think it's coming from the first line here:
https://github.com/com-lihaoyi/mill/blob/main/scalalib/src/mill/scalalib/JavaModule.scala#L39-L41
It can be reproduced on
main
with e.g../mill -i dev.run anything
, even if you update allJavaModuleTests
toJavaTests
.I had a try with some @nowarns on the non-deprecated type in the repo, and removing references to the deprecated JavaModuleTests, but didn't manage to fix it. It looks like it could help though (quick check in Scastie), but no luck trying it in the actual repo:
(Tangent: somehow our -Xfatal-warnings aren't triggered by the warning, so that's good - but we might just have something misconfigured 😅 )
The text was updated successfully, but these errors were encountered: