From 998e1e0de797ab32ffde66e34692632da9ba783a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 21 Mar 2025 15:57:37 -0700 Subject: [PATCH 1/2] Remove the `tell` function from `FileExt` on WASI. Fixes #385. --- cap-primitives/src/fs/file.rs | 3 --- cap-std/src/fs/file.rs | 5 ----- cap-std/src/fs_utf8/file.rs | 5 ----- 3 files changed, 13 deletions(-) diff --git a/cap-primitives/src/fs/file.rs b/cap-primitives/src/fs/file.rs index 4f7df352..5b6a8c14 100644 --- a/cap-primitives/src/fs/file.rs +++ b/cap-primitives/src/fs/file.rs @@ -157,9 +157,6 @@ pub trait FileExt { Ok(()) } - /// Returns the current position within the file. - fn tell(&self) -> io::Result; - /// Adjust the flags associated with this file. fn fdstat_set_flags(&self, flags: u16) -> io::Result<()>; diff --git a/cap-std/src/fs/file.rs b/cap-std/src/fs/file.rs index 2760724a..5774c359 100644 --- a/cap-std/src/fs/file.rs +++ b/cap-std/src/fs/file.rs @@ -523,11 +523,6 @@ impl crate::fs::FileExt for File { std::os::wasi::fs::FileExt::write_vectored_at(&self.std, bufs, offset) } - #[inline] - fn tell(&self) -> std::result::Result { - std::os::wasi::fs::FileExt::tell(&self.std) - } - #[inline] fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> { std::os::wasi::fs::FileExt::fdstat_set_flags(&self.std, flags) diff --git a/cap-std/src/fs_utf8/file.rs b/cap-std/src/fs_utf8/file.rs index 81b38785..bac22a8d 100644 --- a/cap-std/src/fs_utf8/file.rs +++ b/cap-std/src/fs_utf8/file.rs @@ -521,11 +521,6 @@ impl crate::fs::FileExt for File { self.cap_std.write_vectored_at(bufs, offset) } - #[inline] - fn tell(&self) -> std::result::Result { - self.cap_std.tell() - } - #[inline] fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> { self.cap_std.fdstat_set_flags(flags) From b085782619fd656e477b3d5a7b7535056d25c83a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 21 Mar 2025 16:04:27 -0700 Subject: [PATCH 2/2] Pin once_cell for the MSRV build. --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c051493..5e2ef3dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -371,6 +371,10 @@ jobs: - uses: ./.github/actions/install-rust with: toolchain: ${{ matrix.rust }} + + - name: Use specific dependency versions for Rust 1.63 compatibility. + run: cargo update --package=once_cell --precise=1.20.3 + # Don't use --all-features because some of the features have dependencies # that don't work on newer Rust versions. - run: cargo test --workspace --features=fs_utf8,arf_strings