Skip to content
Draft
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
26 changes: 13 additions & 13 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,22 @@ pip.parse(
use_repo(pip, "pip_score_venv_test")

# rust
bazel_dep(name = "rules_rust", version = "0.56.0")
bazel_dep(name = "rules_rust", version = "0.67.0")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.85.0"],
edition = "2024",
versions = ["1.90.0"],
)

# ToDo: Official release needed, documentaion on usage of rust toolchains missing
Copy link
Contributor

Choose a reason for hiding this comment

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

Create an issue for that, this TODO doesn't seem relevant to persistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Even with the ticket I still don't fully grasp the topic here: official release of what, and why is lack of documentation a TODO inside Persistency Bazel files?

bazel_dep(name = "rust_qnx8_toolchain", version = "1.2.0", dev_dependency = True)
archive_override(
module_name = "rust_qnx8_toolchain",
strip_prefix = "qnx8",
urls = [
"https://github.com/qorix-group/rust-lang-qnx8/releases/download/1.2.0/qnx8_rust_toolchain.tar.gz",
],
)

# LLVM Toolchains Rules - host configuration
Expand Down Expand Up @@ -110,16 +120,6 @@ crate.from_cargo(
"//tests/rust_test_scenarios:Cargo.toml",
],
)

bazel_dep(name = "rust_qnx8_toolchain", version = "1.0.0", dev_dependency = True)
archive_override(
module_name = "rust_qnx8_toolchain",
strip_prefix = "qnx8",
urls = [
"https://github.com/qorix-group/rust-lang-qnx8/releases/download/1.0.0/qnx8_rust_toolchain.tar.gz",
],
)

use_repo(crate, "score_persistency_crates")

## temporary overrides / tools
Expand Down
2 changes: 1 addition & 1 deletion src/rust/rust_kvs/src/kvs_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ macro_rules! impl_tryfrom_kvs_value_to_t {
impl std::convert::TryFrom<&KvsValue> for $to {
type Error = String;
fn try_from(value: &KvsValue) -> Result<Self, Self::Error> {
if let KvsValue::$variant(ref n) = value {
if let KvsValue::$variant(n) = value {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the old version silently allows redundant ref definitions where the new version explicitly rejects them

error: binding modifiers may only be written when the default binding mode is `move`
   --> src/rust/rust_kvs/src/kvs_value.rs:93:43
    |
 93 |                 if let KvsValue::$variant(ref n) = value {
    |                                           ^^^^^ occurs within macro expansion
...

so the usage without ref would have been correct before already.

Ok(n.clone())
} else {
Err(format!("KvsValue is not a {}", stringify!($to)))
Expand Down
Loading