Skip to content

Dependency Management #67

Dependency Management

Dependency Management #67

Triggered via pull request September 20, 2024 18:25
Status Success
Total duration 1m 26s
Artifacts

ci.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

34 warnings
this expression creates a reference which is immediately dereferenced by the compiler: src/package/management.rs#L281
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/package/management.rs:281:32 | 281 | value.push(&node); | ^^^^^ help: change this to: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this lifetime isn't used in the function definition: src/package/management.rs#L249
warning: this lifetime isn't used in the function definition --> src/package/management.rs:249:16 | 249 | fn flatten<'a>(root_nodes: Vec<DependencyTreeNode>) -> anyhow::Result<Vec<DependencyTreeNode>> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
the borrowed expression implements the required traits: src/package/management.rs#L195
warning: the borrowed expression implements the required traits --> src/package/management.rs:195:28 | 195 | fs::create_dir_all(&library_path)?; | ^^^^^^^^^^^^^ help: change this to: `library_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/package/management.rs#L85
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/package/management.rs:85:22 | 85 | target_path: &PathBuf, | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg help: change this to | 85 ~ target_path: &Path, 86 | ) -> anyhow::Result<DependencyManager> { 87 | // create library folder 88 ~ let library_path = target_path.to_path_buf().join(LIBRARY_DIRECTORY); 89 | fs::create_dir_all(&library_path)?; ... 92 | let mut lock: DependencyLock; 93 ~ let lock_file = target_path.to_path_buf().join("../Lingo.lock"); 94 | ... 102| // integrity of the build directory 103~ if let Ok(()) = lock.init(&target_path.to_path_buf().join("lfc_include")) { 104| return Ok(DependencyManager { ... 132| // moves the selected packages into the include folder 133~ let include_folder = target_path.to_path_buf().join("lfc_include"); |
this expression creates a reference which is immediately dereferenced by the compiler: src/package/management.rs#L61
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/package/management.rs:61:65 | 61 | let (object, reference) = repo.revparse_ext(&name)?; | ^^^^^ help: change this to: `name` | = 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
unneeded `return` statement: src/package/lock.rs#L281
warning: unneeded `return` statement --> src/package/lock.rs:281:9 | 281 | return Ok(i); | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 281 - return Ok(i); 281 + Ok(i) |
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/package/lock.rs#L261
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/package/lock.rs:261:22 | 261 | source_path: &PathBuf, | ^^^^^^^^ | = 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 | 261 ~ source_path: &Path, 262 | target_path: &PathBuf, ... 265 | for (_, dep) in self.dependencies.iter() { 266 ~ let local_source = source_path.to_path_buf().join(&dep.checksum); |
unneeded `return` statement: src/package/lock.rs#L272
warning: unneeded `return` statement --> src/package/lock.rs:272:9 | 272 | return Ok(()); | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 272 - return Ok(()); 272 + Ok(()) |
the borrowed expression implements the required traits: src/package/lock.rs#L223
warning: the borrowed expression implements the required traits --> src/package/lock.rs:223:54 | 223 | let lingo_toml_text = fs::read_to_string(&temp.join("Lingo.toml"))?; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `temp.join("Lingo.toml")` | = 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
name `PATH` contains a capitalized acronym: src/package/lock.rs#L48
warning: name `PATH` contains a capitalized acronym --> src/package/lock.rs:48:5 | 48 | PATH, | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
name `TARBALL` contains a capitalized acronym: src/package/lock.rs#L47
warning: name `TARBALL` contains a capitalized acronym --> src/package/lock.rs:47:5 | 47 | TARBALL, | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Tarball` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
name `GIT` contains a capitalized acronym: src/package/lock.rs#L46
warning: name `GIT` contains a capitalized acronym --> src/package/lock.rs:46:5 | 46 | GIT, | ^^^ help: consider making the acronym lowercase, except the initial letter: `Git` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
name `REGISTRY` contains a capitalized acronym: src/package/lock.rs#L45
warning: name `REGISTRY` contains a capitalized acronym --> src/package/lock.rs:45:5 | 45 | REGISTRY, | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Registry` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `#[warn(clippy::upper_case_acronyms)]` on by default
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/backends/mod.rs#L27
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/backends/mod.rs:27:5 | 27 | / match command { 28 | | CommandSpec::Build(_build) => { 29 | | let manager = match DependencyManager::from_dependencies( 30 | | dependencies.clone(), ... | 51 | | _ => {} 52 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `#[warn(clippy::single_match)]` on by default help: try | 27 ~ if let CommandSpec::Build(_build) = command { 28 + let manager = match DependencyManager::from_dependencies( 29 + dependencies.clone(), 30 + &PathBuf::from(OUTPUT_DIRECTORY), 31 + ) { 32 + Ok(value) => value, 33 + Err(e) => { 34 + error!("failed to create dependency manager because of {e}"); 35 + return result; 36 + } 37 + }; 38 + 39 + // enriching the apps with the target properties from the libraries 40 + let library_properties = manager.get_target_properties().expect("lib properties"); 41 + 42 + // merging app with library target properties 43 + for app in &mut config.apps { 44 + if let Err(e) = app.properties.merge(&library_properties) { 45 + error!("cannot merge properties from the libraries with the app. error: {e}"); 46 + return result; 47 + } 48 + } 49 + } |
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: src/backends/mod.rs#L25
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> src/backends/mod.rs:25:39 | 25 | let dependencies = Vec::from_iter(config.dependencies.clone().into_iter()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `config.dependencies.clone()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/iter/traits/collect.rs:152:21 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
deref on an immutable reference: src/backends/cmake_c.rs#L36
warning: deref on an immutable reference --> src/backends/cmake_c.rs:36:16 | 36 | content += &*include_statement; | ^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `include_statement` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref = note: `#[warn(clippy::borrow_deref_ref)]` on by default
CPP Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
CPP Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
CPP Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
CPP Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
CPP Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
CPP Test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions/setup-java@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
LFC Fallback Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
LFC Fallback Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
LFC Fallback Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
LFC Fallback Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
LFC Fallback Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
LFC Fallback Test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions/setup-java@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
TypeScript Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
TypeScript Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
TypeScript Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
TypeScript Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
TypeScript Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
TypeScript Test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions/setup-java@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/