Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Install cargo-semver-checks
run: |
mkdir installed-bins
curl -Lf https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.45.0/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz \
curl -Lf https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.47.0/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz --directory=./installed-bins
echo `pwd`/installed-bins >> $GITHUB_PATH
- run: ci/validate-version-bump.sh
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cargo-credential-macos-keychain = { version = "0.4.20", path = "credential/cargo
cargo-credential-wincred = { version = "0.4.20", path = "credential/cargo-credential-wincred" }
cargo-platform = { path = "crates/cargo-platform", version = "0.3.0" }
cargo-test-macro = { version = "0.4.9", path = "crates/cargo-test-macro" }
cargo-test-support = { version = "0.10.0", path = "crates/cargo-test-support" }
cargo-test-support = { version = "0.11.0", path = "crates/cargo-test-support" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is safe across the different branches?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so. The only other differences on the beta branch are:

diff -r crates/cargo-test-support/Cargo.toml /Users/eric/Proj/rust/cargo2/crates/cargo-test-support/Cargo.toml
5c5
< rust-version = "1.92"  # MSRV:1
---
> rust-version = "1.93"  # MSRV:1
7d6
< homepage.workspace = true

which I think should be fine to ignore.

What will happen is that when the stable patch release is made, 0.11.0 will get published. Since there are no differences that really matter, when 1.95 is published, it will just skip cargo-test-support. That should be fine since there are no semver incompatibilities.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bump version script will fail but that isn't blocking at this time

cargo-util = { version = "0.2.27", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.12.0", path = "crates/cargo-util-schemas" }
cargo_metadata = "0.23.1"
Expand Down Expand Up @@ -103,7 +103,7 @@ similar = "2.7.0"
supports-hyperlinks = "3.2.0"
supports-unicode = "3.0.0"
snapbox = { version = "0.6.23", features = ["diff", "dir", "term-svg", "regex", "json"] }
tar = { version = "0.4.44", default-features = false }
tar = { version = "0.4.45", default-features = false }
tempfile = "3.24.0"
thiserror = "2.0.17"
time = { version = "0.3.44", features = ["parsing", "formatting", "serde"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-test-support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-test-support"
version = "0.10.0"
version = "0.11.0"
edition.workspace = true
rust-version = "1.92" # MSRV:1
license.workspace = true
Expand Down
17 changes: 0 additions & 17 deletions crates/cargo-test-support/src/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ pub struct Container {
pub struct ContainerHandle {
/// The name of the container.
name: String,
/// The IP address of the container.
///
/// NOTE: This is currently unused, but may be useful so I left it in.
/// This can only be used on Linux. macOS and Windows docker doesn't allow
/// direct connection to the container.
pub ip_address: String,
/// Port mappings of `container_port` to `host_port` for ports exposed via EXPOSE.
pub port_mappings: HashMap<u16, u16>,
}
Expand Down Expand Up @@ -69,22 +63,11 @@ impl Container {
self.copy_files(&name);
self.start_container(&name);
let info = self.container_inspect(&name);
let ip_address = if cfg!(target_os = "linux") {
info[0]["NetworkSettings"]["IPAddress"]
.as_str()
.unwrap()
.to_string()
} else {
// macOS and Windows can't make direct connections to the
// container. It only works through exposed ports or mapped ports.
"127.0.0.1".to_string()
};
let port_mappings = self.port_mappings(&info);
self.wait_till_ready(&port_mappings);

ContainerHandle {
name,
ip_address,
port_mappings,
}
}
Expand Down
16 changes: 16 additions & 0 deletions crates/cargo-test-support/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ pub struct Dependency {
enum EntryData {
Regular(String),
Symlink(PathBuf),
Directory,
}

/// A file to be created in a package.
Expand Down Expand Up @@ -1331,6 +1332,17 @@ impl Package {
self
}

/// Adds an empty directory at the given path.
pub fn directory(&mut self, path: &str) -> &mut Package {
self.files.push(PackageFile {
path: path.to_string(),
contents: EntryData::Directory,
mode: DEFAULT_MODE,
extra: false,
});
self
}

/// Adds an "extra" file that is not rooted within the package.
///
/// Normal files are automatically placed within a directory named
Expand Down Expand Up @@ -1743,6 +1755,10 @@ impl Package {
t!(header.set_link_name(src));
"" // Symlink has no contents.
}
EntryData::Directory => {
header.set_entry_type(tar::EntryType::Directory);
""
}
};
header.set_size(contents.len() as u64);
t!(header.set_path(path));
Expand Down
5 changes: 3 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ fn prepare_rustc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResult
);
}
base.arg("-Z").arg("crate-attr=feature(frontmatter)");
base.arg("-Z").arg("crate-attr=allow(unused_features)");
}

base.inherit_jobserver(&build_runner.jobserver);
Expand Down Expand Up @@ -857,6 +858,7 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
);
}
rustdoc.arg("-Z").arg("crate-attr=feature(frontmatter)");
rustdoc.arg("-Z").arg("crate-attr=allow(unused_features)");
}
rustdoc.inherit_jobserver(&build_runner.jobserver);
let crate_name = unit.target.crate_name();
Expand Down Expand Up @@ -1538,8 +1540,7 @@ fn trim_paths_args(
}

// feature gate was checked during manifest/config parsing.
cmd.arg("-Zunstable-options");
cmd.arg(format!("-Zremap-path-scope={trim_paths}"));
cmd.arg(format!("--remap-path-scope={trim_paths}"));

// Order of `--remap-path-prefix` flags is important for `-Zbuild-std`.
// We want to show `/rustc/<hash>/library/std` instead of `std-0.0.0`.
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/reference/semver.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ pub struct Example {
// Example usage that will break.
fn main() {
let f = updated_crate::Example { f1: 1, f2: 2 };
let x = &f.f2; // Error: reference to packed field is unaligned
let x = &f.f2; // Error: error[E0793]: reference to field of packed struct is unaligned
}
```

Expand Down Expand Up @@ -656,7 +656,7 @@ use updated_crate::Packed;
fn main() {
let p = Packed { a: 1, b: 2 };
let x = &p.b; // Error: reference to packed field is unaligned
let x = &p.b; // Error: error[E0793]: reference to field of packed struct is unaligned
}
```

Expand Down
7 changes: 2 additions & 5 deletions tests/build-std/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
#![allow(clippy::disallowed_methods)]

use cargo_test_support::Execs;
use cargo_test_support::basic_manifest;
use cargo_test_support::paths;
use cargo_test_support::project;
use cargo_test_support::rustc_host;
use cargo_test_support::str;
use cargo_test_support::target_spec_json;
use cargo_test_support::{Project, prelude::*};
use std::env;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -165,9 +162,7 @@ fn basic() {
.build_std_isolated()
.target_host()
.with_stderr_data(str![[r#"
[COMPILING] [..]
...
[COMPILING] test v0.0.0 ([..])
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/deps/foo-[HASH])
Expand Down Expand Up @@ -279,6 +274,7 @@ fn host_proc_macro() {
}

#[cargo_test(build_std_real)]
#[cfg(false)] // Disabling custom target tests, not backporting support to 1.94.
fn cross_custom() {
let p = project()
.file(
Expand Down Expand Up @@ -308,6 +304,7 @@ fn cross_custom() {
}

#[cargo_test(build_std_real)]
#[cfg(false)] // Disabling custom target tests, not backporting support to 1.94.
fn custom_test_framework() {
let p = project()
.file(
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cache_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::config::GlobalContextBuilder;
/// Helper to verify that it is OK to acquire the given lock (it shouldn't block).
fn verify_lock_is_ok(mode: CacheLockMode) {
let root = paths::root();
threaded_timeout(10, move || {
threaded_timeout(100, move || {
let gctx = GlobalContextBuilder::new().root(root).build();
let locker = CacheLocker::new();
// This would block if it is held.
Expand Down
7 changes: 5 additions & 2 deletions tests/testsuite/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3509,7 +3509,8 @@ fn two_dep_forms() {
// the two local deps.
project
.cargo("check")
.with_stderr_data(str![[r#"
.with_stderr_data(
str![[r#"
[UPDATING] git repository `[ROOTURL]/dep1`
[UPDATING] git repository `[ROOTURL]/dep1`
[LOCKING] 3 packages to latest compatible versions
Expand All @@ -3519,7 +3520,9 @@ fn two_dep_forms() {
[CHECKING] foo v0.5.0 ([ROOT]/foo)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

"#]])
"#]]
.unordered(),
)
.run();
}

Expand Down
1 change: 1 addition & 0 deletions tests/testsuite/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ mod corrupt_git;
mod credential_process;
mod cross_compile;
mod cross_publish;
#[cfg(false)] // Disabling custom target tests, not backporting support to 1.94.
mod custom_target;
mod death;
mod dep_info;
Expand Down
Loading