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

Avoid spurious deprecation warnings in generated code #3379

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Aug 17, 2024

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

@lihaoyi lihaoyi marked this pull request as ready for review August 17, 2024 23:47
@lihaoyi lihaoyi merged commit 7a515fb into com-lihaoyi:main Aug 18, 2024
30 checks passed
@lefou lefou added this to the 0.12.0 milestone Aug 18, 2024
lolgab pushed a commit to lolgab/mill that referenced this pull request 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 pull request 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>
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 this pull request may close these issues.

Warning: @deprecated("Use JavaTests instead", since = "Mill 0.11.10")
2 participants