Skip to content

Commit

Permalink
chore: bump rust version to 1.81.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Mackay committed Oct 23, 2024
1 parent 62f1974 commit 864f385
Show file tree
Hide file tree
Showing 13 changed files with 4,249 additions and 2,836 deletions.
6,260 changes: 3,752 additions & 2,508 deletions Cargo.Bazel.lock

Large diffs are not rendered by default.

781 changes: 475 additions & 306 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository = "https://github.com/aspect-build/rules_py"
license = "Apache 2"
edition = "2021"
readme = "README.md"
rust-version = "1.74.1"
rust-version = "1.81.0"

[workspace.dependencies]
miette = { version = "7.2", features = ["fancy"] }
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rust = use_extension(

rust.toolchain(
edition = "2021",
versions = ["1.74.1"],
versions = ["1.81.0"],
)
use_repo(rust, "rust_toolchains")

Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ python_register_toolchains(
name = "python_toolchain_3_8",
python_version = "3.8.12",
# Setting `set_python_version_constraint` will set special constraints on the registered toolchain.
# This means that this toolchain registration will only be selected for `py_binary` / `py_test` targets
# This means that this toolchain registration will only be selected for `py_binary` / `py_test` targets
# that have the `python_version = "3.8.12"` attribute set. Targets that have no `python_attribute` will use
# the default toolchain resolved which can be seen below.
set_python_version_constraint = True,
Expand Down Expand Up @@ -154,7 +154,7 @@ rules_rust_dependencies()

RUST_EDITION = "2021"

RUST_VERSION = "1.77.2"
RUST_VERSION = "1.81.0"

rust_register_toolchains(
edition = RUST_EDITION,
Expand Down
2 changes: 1 addition & 1 deletion e2e/repository-rule-deps/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bazel_dep(name = "rules_rust", version = "0.53.0")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.74.1"],
versions = ["1.81.0"],
)
use_repo(rust, "rust_toolchains")

Expand Down
2 changes: 1 addition & 1 deletion e2e/smoke/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bazel_dep(name = "rules_rust", version = "0.53.0")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.74.1"],
versions = ["1.81.0"],
)
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")
Expand Down
2 changes: 1 addition & 1 deletion e2e/smoke/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules_rust_dependencies()

rust_register_toolchains(
edition = "2021",
versions = ["1.74.1"],
versions = ["1.81.0"],
)

load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
Expand Down
2 changes: 1 addition & 1 deletion e2e/system-interpreter/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bazel_dep(name = "rules_rust", version = "0.53.0")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.74.1"],
versions = ["1.81.0"],
)
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")
Expand Down
2 changes: 1 addition & 1 deletion py/tools/py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ rust-version.workspace = true

[dependencies]
miette = { workspace = true }
rattler_installs_packages = { git = "https://github.com/prefix-dev/rip", rev = "b047c9ec0b42125a67d35346f08b7e7848ac24f4", default-features = false, features = ["rustls-tls"] }
rattler_installs_packages = { git = "https://github.com/prefix-dev/rip", rev = "1b4d909496f68c292800ebbd3667c8682b01d218", default-features = false, features = ["rustls-tls"] }
2 changes: 1 addition & 1 deletion py/tools/py/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{

use miette::{Context, IntoDiagnostic};
use rattler_installs_packages::{
artifacts::wheel::InstallPaths,
install::InstallPaths,
python_env::{PythonInterpreterVersion, PythonLocation},
};

Expand Down
22 changes: 11 additions & 11 deletions py/tools/py/src/unpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::Path;

use miette::{miette, IntoDiagnostic, Result};
use rattler_installs_packages::{
artifacts::wheel::UnpackWheelOptions, artifacts::Wheel, types::PackageName,
artifacts::Wheel, install::install_wheel, install::InstallWheelOptions, types::PackageName,
};

use crate::Interpreter;
Expand All @@ -18,24 +18,24 @@ pub fn unpack_wheel(
let python_executable = interpreter.executable()?;
let install_paths = interpreter.install_paths(false);

let unpack_options = UnpackWheelOptions {
let install_options = InstallWheelOptions {
installer: Some("Aspect Build rules_py".to_string()),
// launcher_arch:
..UnpackWheelOptions::default()
..InstallWheelOptions::default()
};

let package_name: PackageName = pkg_name.parse().unwrap();
let wheel = Wheel::from_path(wheel, &package_name.into())
.map_err(|_| miette!("Failed to create wheel from path"))?;

wheel
.unpack(
&location,
&install_paths,
&python_executable,
&unpack_options,
)
.into_diagnostic()?;
install_wheel(
&wheel,
&location,
&install_paths,
&python_executable,
&install_options,
)
.into_diagnostic()?;

Ok(())
}
2 changes: 1 addition & 1 deletion py/tools/unpack_bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ name = "unpack"
path = "src/main.rs"

[dependencies]
clap = { version = "4.1.11", features = ["derive"] }
clap = { version = "4.5.20", features = ["derive"] }
miette = { workspace = true }
py = { path = "../py" }

0 comments on commit 864f385

Please sign in to comment.