Skip to content

Log the DB "flavour" on startup #316

Log the DB "flavour" on startup

Log the DB "flavour" on startup #316

Triggered via push December 1, 2024 20:06
Status Failure
Total duration 7m 15s
Artifacts

format-check.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 16 warnings
`moor_db::DatabaseFlavour` doesn't implement `std::fmt::Display`: crates/daemon/src/main.rs#L291
error[E0277]: `moor_db::DatabaseFlavour` doesn't implement `std::fmt::Display` --> crates/daemon/src/main.rs:291:9 | 291 | args.db_flavour, args.db | ^^^^^^^^^^^^^^^ `moor_db::DatabaseFlavour` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `moor_db::DatabaseFlavour` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: this error originates in the macro `::core::format_args` which comes from the expansion of the macro `info` (in Nightly builds, run with -Z macro-backtrace for more info)
`moor_db::DatabaseFlavour` doesn't implement `std::fmt::Display`: crates/daemon/src/main.rs#L291
error[E0277]: `moor_db::DatabaseFlavour` doesn't implement `std::fmt::Display` --> crates/daemon/src/main.rs:291:9 | 291 | args.db_flavour, args.db | ^^^^^^^^^^^^^^^ `moor_db::DatabaseFlavour` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `moor_db::DatabaseFlavour` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: this error originates in the macro `::core::format_args` which comes from the expansion of the macro `info` (in Nightly builds, run with -Z macro-backtrace for more info)
style
Docker build failed with exit code 1
function `json_as_var` is never used: crates/web-host/src/host/mod.rs#L102
warning: function `json_as_var` is never used --> crates/web-host/src/host/mod.rs:102:8 | 102 | 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#L95
warning: variants `UnknownType`, `UnknownError`, and `InvalidRepresentation` are never constructed --> crates/web-host/src/host/mod.rs:95:5 | 93 | pub enum JsonParseError { | -------------- variants in this enum 94 | #[error("Unknown type")] 95 | UnknownType, | ^^^^^^^^^^^ 96 | #[error("Unknown error")] 97 | UnknownError, | ^^^^^^^^^^^^ 98 | #[error("Invalid representation")] 99 | 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
unused imports: `json_as_var` and `var_as_json`: crates/web-host/src/host/verbs.rs#L15
warning: unused imports: `json_as_var` and `var_as_json` --> crates/web-host/src/host/verbs.rs:15:25 | 15 | use crate::host::{auth, json_as_var, var_as_json, web_host, WebHost}; | ^^^^^^^^^^^ ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
very complex type used. Consider factoring parts into `type` definitions: crates/kernel/src/tasks/task.rs#L583
warning: very complex type used. Consider factoring parts into `type` definitions --> crates/kernel/src/tasks/task.rs:583:6 | 583 | ) -> Result<Option<((Bytes, VerbDef), Obj)>, 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