Skip to content

Regression on nightly when compiling mio for wasm32-wasi #99502

Description

@bstrie

Steps to reproduce:

$ rustup toolchain install 1.62.1 --target wasm32-wasi
$ rustup toolchain install nightly-2022-07-19 --target wasm32-wasi
$ git clone https://github.com/tokio-rs/mio.git
$ cd mio
$ git checkout v0.8.4
$ cargo +1.62.1 build --target wasm32-wasi --all-features
   Compiling libc v0.2.126
   Compiling log v0.4.17
   Compiling cfg-if v1.0.0
   Compiling wasi v0.11.0+wasi-snapshot-preview1
   Compiling mio v0.8.4 (/home/ben/code/mio)
    Finished dev [unoptimized + debuginfo] target(s) in 0.66s
$ cargo +nightly-2022-07-19 build --target wasm32-wasi --all-features
   Compiling log v0.4.17
   Compiling libc v0.2.126
   Compiling cfg-if v1.0.0
   Compiling wasi v0.11.0+wasi-snapshot-preview1
   Compiling mio v0.8.4 (/home/ben/code/mio)
error[E0658]: use of unstable library feature 'wasi_ext'
 --> src/io_source.rs:5:5
  |
5 | use std::os::wasi::io::AsRawFd;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #71213 <https://github.com/rust-lang/rust/issues/71213> for more information
  = help: add `#![feature(wasi_ext)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.
error: could not compile `mio` due to previous error

It's possible that this was accidentally stabilized, then feature gated later.

Activity

  1. added
    C-bugCategory: This is a bug.
    regression-untriagedUntriaged performance or correctness regression.
    on Jul 20, 2022
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jul 20, 2022
  3. ehuss commented on Jul 20, 2022

    @ehuss
    Contributor

    This seems to be caused by #95956.

    I was thinking #99292 might address this, but I tried that PR and it doesn't seem to work. Maybe @Aaron1011 can confirm.

    cc @yaahc

  4. yaahc commented on Jul 20, 2022

    @yaahc
    Member

    Looks like another case of #99288, AsRawFd is stable but the std::os::wasi::io module it lives in is not: https://doc.rust-lang.org/stable/std/os/wasi/io/index.html

    Just need to add #[cfg_attr(not(bootstrap), rustc_allowed_through_unstable_modules)] and it should work.

  5. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jul 21, 2022
  6. bstrie commented on Jul 21, 2022

    @bstrie
    ContributorAuthor

    I'll work on this.

  7. bstrie commented on Jul 25, 2022

    @bstrie
    ContributorAuthor

    @yaahc Using your suggested fix, I have a simple PR to address this, if you'd like to review: #99723 . I've confirmed locally that a toolchain built with this patch fixes the regression.

  8. added
    T-libs-api[DEPRECATED; DO NOT USE]
    and removed
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jul 27, 2022
  9. added a commit that references this issue on Jul 27, 2022
    0eb28ab
  10. added 2 commits that reference this issue on Jul 27, 2022
    46e21aa
    494808f
  11. added 2 commits that reference this issue on Jul 28, 2022
    5996733
    f326692
  12. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on May 16, 2023
  13. added 2 commits that reference this issue on Jan 19, 2025
  14. added a commit that references this issue on Jan 20, 2025
  15. added a commit that references this issue on Jan 20, 2025
  16. added a commit that references this issue on Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-libs-api[DEPRECATED; DO NOT USE]regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions