fix: bumped version of redox_installer and fixed compile errors for install.
Problem
Following command
cargo install --path=.
aborts with the following error message without this patch.
Installing redoxer v0.2.27 (/home/nice_graphic/Code/rust/gitlab/fork_redoxer)
Updating crates.io index
Compiling redoxer v0.2.27 (/home/nice_graphic/Code/rust/gitlab/fork_redoxer)
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
--> src/exec.rs:28:9
|
28 | redox_installer::install(config, &bootloader_dir, cookbook).map_err(|err| {
| ^^^^^^^^^^^^^^^^^^^^^^^^ ------ --------------- -------- supplied 3 arguments
| |
| expected 4 arguments
|
note: function defined here
--> /home/nice_graphic/.cargo/registry/src/github.com-1ecc6299db9ec823/redox_installer-0.2.12/src/lib.rs:537:8
|
537 | pub fn install<P, S>(config: Config, output: P, cookbook: Option<S>, live: bool)
| ^^^^^^^
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
--> src/exec.rs:102:13
|
102 | redox_installer::install(config, &base_dir, cookbook).map_err(|err| {
| ^^^^^^^^^^^^^^^^^^^^^^^^ ------ --------- -------- supplied 3 arguments
| |
| expected 4 arguments
|
note: function defined here
--> /home/nice_graphic/.cargo/registry/src/github.com-1ecc6299db9ec823/redox_installer-0.2.12/src/lib.rs:537:8
|
537 | pub fn install<P, S>(config: Config, output: P, cookbook: Option<S>, live: bool)
| ^^^^^^^
For more information about this error, try `rustc --explain E0061`.
error: failed to compile `redoxer v0.2.27 (/home/nice_graphic/Code/rust/gitlab/fork_redoxer)`, intermediate artifacts can be found at `/home/nice_graphic/Code/rust/gitlab/fork_redoxer/target`
Caused by:
could not compile `redoxer` due to 2 previous errors
This also prevents building an image from the Dockerfile in the redox_installer respo.
Reason for this problem
During installation it ignores the Cargo.lock of redox_installer crate as dependency and uses version 0.2.12 which broke the API on function install with adding 4. parameter live for this crate. This crate however assumes the redox_installer with version 0.2.10 according to the Cargo.lock. In this version the function install has only 3 parameters.
Fix
By bumping the version of redox_installer to 0.2.12, the error with the missing parameter becomes clear in the code editor of choice. This PR calls the functions with needed 4 parameter to fix the compile errors resulting by bumping version to 0.2.12.
Remark
- The diff of the changed src/lib.rs is also affected by the format on save on the default cargo format settings
- The 4 parameter is given as false. I assumed this as sensible default. I might be wrong here.