Skip to content

WASI FileExt::tell is gone, breaks build #385

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

Closed
Mrmaxmeier opened this issue Mar 21, 2025 · 2 comments · Fixed by #387
Closed

WASI FileExt::tell is gone, breaks build #385

Mrmaxmeier opened this issue Mar 21, 2025 · 2 comments · Fixed by #387

Comments

@Mrmaxmeier
Copy link

Hi,

building cap-std against wasm32-wasip1 fails with the following compiler error with recent nightlies:

error[E0782]: expected a type, found a trait
   --> cap-std/src/fs/file.rs:528:9
    |
528 |         std::os::wasi::fs::FileExt::tell(&self.std)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: you can add the `dyn` keyword if you want a trait object
    |
528 |         <dyn std::os::wasi::fs::FileExt>::tell(&self.std)
    |         ++++                           +

For more information about this error, try `rustc --explain E0782`.

The method was removed here: rust-lang/rust#137205

(I'm not sure how cap-std handles version bumps considering that WASI support depends on the unstable wasi_ext feature but I guess just removing the fn tell(&self) from cap-std's extension trait might be fine?)

Thanks! 🙂

@sunfishcode
Copy link
Member

Thanks for the report! I've now posted #387 to fix this.

sunfishcode added a commit that referenced this issue Apr 4, 2025
* Remove the `tell` function from `FileExt` on WASI.

Fixes #385.

* Pin once_cell for the MSRV build.
@sunfishcode
Copy link
Member

This is now fixed in cap-std 3.4.3,

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 a pull request may close this issue.

2 participants