Stream: git-wasmtime

Topic: wasmtime / PR #10108 Disallow dead code/unused imports by...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 24 2025 at 21:25):

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 the default 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 the default feature is disabled by default and never actually enabled by any dependency inside the repository. Instead each crate, like wasmtime-cli, has its own default 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:

  1. Change wasmtime-cli's default feature to include wasmtime/default.
  2. 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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 24 2025 at 21:34):

alexcrichton commented on PR #10108:

Oof that's a lot of red

view this post on Zulip Wasmtime GitHub notifications bot (Jan 28 2025 at 01:27):

alexcrichton closed without merge PR #10108.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 28 2025 at 01:27):

alexcrichton commented on PR #10108:

Moving to https://github.com/bytecodealliance/wasmtime/pull/10131


Last updated: Feb 28 2025 at 02:27 UTC