Lots of warnings during compilation of v0.3.0
cielonet opened this issue · 5 comments
cielonet commented
Building inside a docker using these commands I am getting a lot of warnings. Don't recall seeing these before? I know a lot has changed as well. I will be trying the dev
branch and testing that as well.
RUN git clone --depth=1 https://github.com/br0kej/bin2ml.git && \
(cd bin2ml && cargo build --release && cargo install --locked --path . && ln -s /bin2ml/target/release/bin2ml /usr/local/bin/bin2ml)
Compiling bin2ml v0.3.0 (/workspace/bin2ml)
warning: unexpected `cfg` condition name: `inference`
--> src/main.rs:508:40
|
508 | } else if cfg!(inference) {
| ^^^^^^^^^ help: found config with similar value: `feature = "inference"`
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(inference)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(inference)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: fields `file_type_one` and `file_type_two` are never read
--> src/combos.rs:44:9
|
42 | pub struct ComboJob {
| -------- fields in this struct
43 | pub combo_type: ComboTypes,
44 | pub file_type_one: ComboFileTypes,
| ^^^^^^^^^^^^^
45 | pub file_type_two: ComboFileTypes,
| ^^^^^^^^^^^^^
|
= note: `ComboJob` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: `bin2ml` (bin "bin2ml") generated 2 warnings
Finished `release` profile [optimized] target(s) in 1m 12s
Installing bin2ml v0.3.0 (/workspace/bin2ml)
Updating crates.io index
warning: unexpected `cfg` condition name: `inference`
--> src/main.rs:508:40
|
508 | } else if cfg!(inference) {
| ^^^^^^^^^ help: found config with similar value: `feature = "inference"`
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(inference)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(inference)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: fields `file_type_one` and `file_type_two` are never read
--> src/combos.rs:44:9
|
42 | pub struct ComboJob {
| -------- fields in this struct
43 | pub combo_type: ComboTypes,
44 | pub file_type_one: ComboFileTypes,
| ^^^^^^^^^^^^^
45 | pub file_type_two: ComboFileTypes,
| ^^^^^^^^^^^^^
|
= note: `ComboJob` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: `bin2ml` (bin "bin2ml") generated 2 warnings
Finished `release` profile [optimized] target(s) in 0.79s
Installing /root/.cargo/bin/bin2ml
Installed package `bin2ml v0.3.0 (/workspace/bin2ml)` (executable `bin2ml`)
cielonet commented
BTW. I am using latest version of cargo inside latest nvidia container
FROM nvcr.io/nvidia/pytorch:24.07-py3
# cargo
RUN wget -qO- https://sh.rustup.rs | CARGO_HOME=/etc/cargo sh -s -- -y -q --no-modify-path
ENV PATH=$PATH:/etc/cargo/bin
br0kej commented
Thanks for raising this issue @cielonet. I will have a look into this. I think it may be something to do with the cargo
/rust
version you have. Could you confirm which version is being installed?