alexcrichton opened PR #10108 from alexcrichton:deny-unknown-imports
to bytecodealliance:main
:
This PR is a change to the crate attributes of the
wasmtime
crate. Quite some time ago when Wasmtime had far fewer crate features I added a directive to allow dead code and unused imports when thedefault
feature was disabled. The original intention was to not worry too much about unused imports and dead code in every possible configuration of Wasmtime to ease the burden of dealing with unused imports or compile-time conditionally used code.The primary consequence of this change though is that
cargo build
doesn't actually warn about dead code or unused imports in this repository during development. The reason for this is that thedefault
feature is disabled by default and never actually enabled by any dependency inside the repository. Instead each crate, likewasmtime-cli
, has its owndefault
feature.If I were to start from the problem of "I want dead code warnings by default in this repository" there's two possible fixes:
- Change
wasmtime-cli
'sdefault
feature to includewasmtime/default
.- Remove this
#[allow]
directive.While (1) would indeed work this is an attempt to get (2) working to see how bad the changes are necessary within the crate.
prtest:full
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton commented on PR #10108:
Oof that's a lot of red
alexcrichton closed without merge PR #10108.
alexcrichton commented on PR #10108:
Moving to https://github.com/bytecodealliance/wasmtime/pull/10131
Last updated: Feb 28 2025 at 02:27 UTC