Skip to content

Fix to incorrect deduction on whether a Fjall-based DB is "fresh" or … #318

Fix to incorrect deduction on whether a Fjall-based DB is "fresh" or …

Fix to incorrect deduction on whether a Fjall-based DB is "fresh" or … #318

Triggered via push November 24, 2024 17:53
Status Failure
Total duration 6m 40s
Artifacts

rust-build.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error and 22 warnings
build_default_macos
Process completed with exit code 101.
very complex type used. Consider factoring parts into `type` definitions: crates/daemon/src/rpc_hosts.rs#L24
warning: very complex type used. Consider factoring parts into `type` definitions --> crates/daemon/src/rpc_hosts.rs:24:18 | 24 | pub struct Hosts(HashMap<HostToken, (SystemTime, HostType, Vec<(Objid, SocketAddr)>)>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
casting to the same type is unnecessary (`i64` -> `i64`): crates/daemon/src/connections_rb.rs#L200
warning: casting to the same type is unnecessary (`i64` -> `i64`) --> crates/daemon/src/connections_rb.rs:200:47 | 200 | let connection_id: i64 = -4 - (connection_id as i64); | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `connection_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
function `verb_invoke_handler` is never used: crates/web-host/src/host/verbs.rs#L33
warning: function `verb_invoke_handler` is never used --> crates/web-host/src/host/verbs.rs:33:14 | 33 | pub async fn verb_invoke_handler( | ^^^^^^^^^^^^^^^^^^^
function `json_as_var` is never used: crates/web-host/src/host/mod.rs#L100
warning: function `json_as_var` is never used --> crates/web-host/src/host/mod.rs:100:8 | 100 | pub fn json_as_var(j: &serde_json::Value) -> Result<Var, JsonParseError> { | ^^^^^^^^^^^
variants `UnknownType`, `UnknownError`, and `InvalidRepresentation` are never constructed: crates/web-host/src/host/mod.rs#L93
warning: variants `UnknownType`, `UnknownError`, and `InvalidRepresentation` are never constructed --> crates/web-host/src/host/mod.rs:93:5 | 91 | pub enum JsonParseError { | -------------- variants in this enum 92 | #[error("Unknown type")] 93 | UnknownType, | ^^^^^^^^^^^ 94 | #[error("Unknown error")] 95 | UnknownError, | ^^^^^^^^^^^^ 96 | #[error("Invalid representation")] 97 | InvalidRepresentation, | ^^^^^^^^^^^^^^^^^^^^^ | = note: `JsonParseError` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
very complex type used. Consider factoring parts into `type` definitions: crates/kernel/src/tasks/task.rs#L576
warning: very complex type used. Consider factoring parts into `type` definitions --> crates/kernel/src/tasks/task.rs:576:6 | 576 | ) -> Result<Option<((Bytes, VerbDef), Objid)>, CommandError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
attempt to mutate range bound within loop: crates/db-fjall/src/value_set.rs#L132
warning: attempt to mutate range bound within loop --> crates/db-fjall/src/value_set.rs:132:17 | 132 | num_values -= 1; | ^^^^^^^^^^ | = note: the range of the loop is unchanged = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_range_bound = note: `#[warn(clippy::mut_range_bound)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: crates/db-fjall/src/fjall_relation.rs#L333
warning: this expression creates a reference which is immediately dereferenced by the compiler --> crates/db-fjall/src/fjall_relation.rs:333:30 | 333 | let result = tx.take(&table, key.as_bytes().unwrap()).unwrap(); | ^^^^^^ help: change this to: `table` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this `let...else` may be rewritten with the `?` operator: crates/db-fjall/src/fjall_relation.rs#L291
warning: this `let...else` may be rewritten with the `?` operator --> crates/db-fjall/src/fjall_relation.rs:291:9 | 291 | / let Some(seq_val) = tx.get(&self.sequences_partition, &seq_name).unwrap() else { 292 | | return None; 293 | | }; | |__________^ help: replace it with: `let seq_val = tx.get(&self.sequences_partition, &seq_name).unwrap()?;` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark = note: `#[warn(clippy::question_mark)]` on by default
the borrowed expression implements the required traits: crates/db-fjall/src/fjall_relation.rs#L283
warning: the borrowed expression implements the required traits --> crates/db-fjall/src/fjall_relation.rs:283:57 | 283 | tx.insert(&self.sequences_partition, &seq_name, &next_bytes); | ^^^^^^^^^^^ help: change this to: `next_bytes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
casting to the same type is unnecessary (`i64` -> `i64`): crates/db-fjall/src/fjall_relation.rs#L280
warning: casting to the same type is unnecessary (`i64` -> `i64`) --> crates/db-fjall/src/fjall_relation.rs:280:29 | 280 | let next = prev.max(value as i64); | ^^^^^^^^^^^^ help: try: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
the borrowed expression implements the required traits: crates/db-fjall/src/fjall_relation.rs#L263
warning: the borrowed expression implements the required traits --> crates/db-fjall/src/fjall_relation.rs:263:57 | 263 | tx.insert(&self.sequences_partition, &seq_name, &next_bytes); | ^^^^^^^^^^^ help: change this to: `next_bytes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: crates/db-fjall/src/fjall_relation.rs#L220
warning: the borrowed expression implements the required traits --> crates/db-fjall/src/fjall_relation.rs:220:57 | 220 | tx.insert(&table, codomain.as_bytes().unwrap(), &new_cset.data()); | ^^^^^^^^^^^^^^^^ help: change this to: `new_cset.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: crates/db-fjall/src/fjall_relation.rs#L199
warning: the borrowed expression implements the required traits --> crates/db-fjall/src/fjall_relation.rs:199:43 | 199 | tx.insert(&table, codomain_bytes, &new_cset.data()); | ^^^^^^^^^^^^^^^^ help: change this to: `new_cset.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: crates/db-fjall/src/fjall_relation.rs#L124
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> crates/db-fjall/src/fjall_relation.rs:124:31 | 124 | relations_partitions: &Vec<RelationPartitions>, | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default help: change this to | 124 ~ relations_partitions: &[RelationPartitions], 125 | ) -> Self { ... 128 | sequences_partition: sequences_partition.clone(), 129 ~ relations_partitions: relations_partitions.to_owned(), |
`to_string` applied to a type that implements `Display` in `format!` args: crates/db-fjall/src/fjall_db.rs#L85
warning: `to_string` applied to a type that implements `Display` in `format!` args --> crates/db-fjall/src/fjall_db.rs:85:58 | 85 | &format!("{}_secondary", relation.to_string()), | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
unnecessary use of `to_string`: crates/db-fjall/src/fjall_db.rs#L76
warning: unnecessary use of `to_string` --> crates/db-fjall/src/fjall_db.rs:76:33 | 76 | .open_partition(&relation.to_string(), PartitionCreateOptions::default()) | ^^^^^^^^^^^^^^^^^^^^^ help: use: `relation.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
unnecessary use of `to_string`: crates/db-fjall/src/fjall_db.rs#L72
warning: unnecessary use of `to_string` --> crates/db-fjall/src/fjall_db.rs:72:43 | 72 | if !keyspace.partition_exists(&relation.to_string()) { | ^^^^^^^^^^^^^^^^^^^^^ help: use: `relation.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned = note: `#[warn(clippy::unnecessary_to_owned)]` on by default
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy_check
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build_default_macos
Treating cmake as a formula. For the cask, use homebrew/cask/cmake or specify the `--cask` flag. To silence this message, use the `--formula` flag.
build_default_macos
cmake 3.31.0 is already installed and up-to-date. To reinstall 3.31.0, run: brew reinstall cmake