Skip to content

Recent minor version upgrade of clap breaks building with a wasm target. #4510

Closed
@0xForerunner

Description

Please complete the following tasks

Rust Version

rustc 1.67.0-nightly (b3bc6bf31 2022-11-24)

Clap Version

between 4.0.22 and 4.0.27

Minimal reproducible code

fn main() {}

Steps to reproduce the bug with the above code

just compile to wasm32-unknown-unknown and it breaks. 4.0.22 works as expected, 4.0.27 does not compile.

Actual Behaviour

~/lending-contracts (develop) » cargo update -p clap                                                                                                                                                                                                       ewoolsey@Erics-MacBook-Pro
    Updating crates.io index
    Updating clap v4.0.22 -> v4.0.27
      Adding errno v0.2.8
      Adding errno-dragonfly v0.1.2
      Adding hermit-abi v0.2.6
      Adding io-lifetimes v1.0.2
      Adding is-terminal v0.4.0
      Adding linux-raw-sys v0.1.3
      Adding rustix v0.36.3
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/lending-contracts (develop*) » d b                                                                                                                                                                                              ewoolsey@Erics-MacBook-Pro
   Compiling libc v0.2.137
   Compiling io-lifetimes v1.0.2
   Compiling rustix v0.36.3
   Compiling errno v0.2.8
   Compiling neptune-authorization v0.1.0 (/Users/ewoolsey/lending-contracts/packages/neptune-auth)
error[E0583]: file not found for module `sys`
  --> /Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.8/src/lib.rs:33:1
   |
33 | mod sys;
   | ^^^^^^^^
   |
   = help: to create the module `sys`, create file "/Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.8/src/sys.rs" or "/Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.8/src/sys/mod.rs"

error[E0425]: cannot find function `errno` in module `sys`
   --> /Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.8/src/lib.rs:101:10
    |
101 |     sys::errno()
    |          ^^^^^ not found in `sys`

error[E0425]: cannot find function `set_errno` in module `sys`
   --> /Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.8/src/lib.rs:106:10
    |
106 |     sys::set_errno(err)
    |          ^^^^^^^^^ not found in `sys`

Some errors have detailed explanations: E0425, E0583.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `errno` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
process exited unsuccessfully: exit status: 101

Expected Behaviour

Minor version increments should not introduce breaking changes. I'm not sure exactly which version increment causes the issue but it appears to be from the inclusion of errno.

Additional Context

No response

Debug Output

No response

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Updating dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions