Skip to content

Commit a0a03b1

Browse files
authored
Remove an unneeded doc, fixing the doc build on stable Rust. (#627)
* Remove an unneeded doc, fixing the doc build on stable Rust. Remove a doc comment which is redundant because it's on a re-export of an item which already has its own doc comment. This also happens to work around a bug in at least Rust 1.69. Fixes #624. * In the Rust 1.48 CI, pin tempfile to 3.4.0. tempfile 3.5.0 depends on rustix 0.37. Pin to tempfile 3.4.0 since it uses rustix 0.36 as this is the rustix 0.36 branch. * Temporarily disable tests on Windows. * Disable `test_backends` on Rust 1.48. * Disable FreeBSD CI for now. (#530) (#600) FreeBSD CI is currently broken with this error ``` [4/4] Extracting curl-7.88.1: .......... done curl https://sh.rustup.rs -sSf --output rustup.sh ld-elf.so.1: /usr/local/lib/libcurl.so.4: Undefined symbol "nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation" ``` From some quick searches I found [this bug] which looks related, but I didn't see anything in the discussion which would let us work around the problem. [this bug]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269253
1 parent 40eb92a commit a0a03b1

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

.cirrus.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# Implementation derived from `.cirrus.yml` in Rust's libc bindings
22
# at revision 7f4774e76bd5cb9ccb7140d71ef9be9c16009cdf.
33

4-
task:
5-
name: stable x86_64-unknown-freebsd-13
6-
freebsd_instance:
7-
image_family: freebsd-13-1
8-
setup_script:
9-
- pkg install -y curl
10-
- curl https://sh.rustup.rs -sSf --output rustup.sh
11-
- sh rustup.sh --default-toolchain stable -y --profile=minimal
12-
- . $HOME/.cargo/env
13-
- rustup default stable
14-
test_script:
15-
- . $HOME/.cargo/env
16-
- cargo test --workspace --features=all-apis
4+
# Disable FreeBSD testing for now, as we currently hit this error:
5+
#
6+
# [4/4] Extracting curl-7.88.1: .......... done
7+
# curl https://sh.rustup.rs -sSf --output rustup.sh
8+
# ld-elf.so.1: /usr/local/lib/libcurl.so.4: Undefined symbol "nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation"
9+
10+
#task:
11+
# name: stable x86_64-unknown-freebsd-13
12+
# freebsd_instance:
13+
# image_family: freebsd-13-1
14+
# setup_script:
15+
# - pkg install -y curl
16+
# - curl https://sh.rustup.rs -sSf --output rustup.sh
17+
# - sh rustup.sh --default-toolchain stable -y --profile=minimal
18+
# - . $HOME/.cargo/env
19+
# - rustup default stable
20+
# test_script:
21+
# - . $HOME/.cargo/env
22+
# - cargo test --workspace --features=all-apis

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
if: matrix.rust == '1.48'
9292
run: |
9393
cargo update --package=once_cell --precise 1.14.0
94+
cargo update --package=tempfile --precise=3.4.0
9495
cargo update --package=io-lifetimes --precise 1.0.6
9596
for crate in test-crates/*; do
9697
cd $crate
@@ -532,6 +533,7 @@ jobs:
532533
if: matrix.rust == '1.48'
533534
run: |
534535
cargo update --package=once_cell --precise 1.14.0
536+
cargo update --package=tempfile --precise=3.4.0
535537
cargo update --package=io-lifetimes --precise 1.0.6
536538
for crate in test-crates/*; do
537539
cd $crate

src/io/read_write.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub use backend::io::io_slice::{IoSlice, IoSliceMut};
1111
#[cfg(feature = "std")]
1212
pub use std::io::{IoSlice, IoSliceMut};
1313

14-
/// `RWF_*` constants for use with [`preadv2`] and [`pwritev2`].
1514
#[cfg(any(target_os = "android", target_os = "linux"))]
1615
pub use backend::io::types::ReadWriteFlags;
1716

tests/backends.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ use std::process::Command;
22

33
#[test]
44
fn test_backends() {
5+
// Test whether `has_dependency` works. `cargo tree` no longer works in
6+
// Rust 1.48 because `cargo tree` pulls in dependencies for all targets,
7+
// and hermit-core isn't compatible with Rust 1.48.
8+
if !has_dependency(".", &[], &[], &[], "io-lifetimes") {
9+
return;
10+
}
11+
512
// Pick an arbitrary platform where linux_raw is enabled by default and
613
// ensure that the use-default crate uses it.
714
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
@@ -54,6 +61,15 @@ fn test_backends() {
5461
#[cfg(any(unix, target_os = "wasi"))]
5562
let libc_dep = "libc";
5663

64+
// FIXME: Temporarily disable the subsequent tests on Windows until
65+
// rust-errno updates to windows-sys 0.48.
66+
#[cfg(windows)]
67+
{
68+
if true {
69+
return;
70+
}
71+
}
72+
5773
// Test the use-libc crate, which enables the "use-libc" cargo feature.
5874
assert!(
5975
has_dependency("test-crates/use-libc", &[], &[], &["RUSTFLAGS"], libc_dep),

0 commit comments

Comments
 (0)