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

Try to fix deprecated discover warning #3711

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Oct 10, 2024

fixes #3385

Somehow the @nowarn annotations don't seem to work after we moved the millDiscover definition into the main module body (???) so instead of relying on those I try to fix the deprecated warning in the Discover macro itself by identifying type annotations and explicitly asking not to dereference them

Manually tested by running the commands below, observed that no deprecation warning was printed

rm -rf /Users/lihaoyi/Github/mill/example/javalib/basic/1-simple/out
./mill -i dist.run example/javalib/basic/1-simple -i run -t hello

.
@lihaoyi lihaoyi marked this pull request as ready for review October 10, 2024 12:16
.
.
.
.
@lihaoyi lihaoyi merged commit a4d3e94 into com-lihaoyi:main Oct 10, 2024
24 checks passed
@lefou lefou added this to the 0.12.0 milestone Oct 12, 2024
lihaoyi added a commit that referenced this pull request Oct 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Follow up to #3711

I swear this annotation didn't work last time, and the `match` on the
`discoveredModuleType` did. But now they don't. Must have been getting
confused by incremental compilation

Turns out the discover macro was incorrectly traversing type members and
picking up their types, which is why it was appeared in the generated
code, so I added a filter to filter them out

Added a test to assert on the full stdout/stderr of a simple mill
command run to ensure we don't have stray logs or warnings turning up
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.

trait JavaModuleTests in trait JavaModule is deprecated
2 participants