Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings went building eza v0.18.11 with cargo #942

Open
clavelm opened this issue Apr 19, 2024 · 3 comments
Open

Warnings went building eza v0.18.11 with cargo #942

clavelm opened this issue Apr 19, 2024 · 3 comments
Labels
question Further information is requested

Comments

@clavelm
Copy link

clavelm commented Apr 19, 2024

I’m not sure where to put this as it’s not a bug, nor a compilation error.

When building eza v0.18.11 with cargo with cargo, I’m getting warnings.
I am in a local git repo, in detached head on the commit corresponding to the tag v0.18.11.

❯ git switch -d v0.18.11
Previous HEAD position was 75f1f8cf chore: release eza v0.18.10
HEAD is now at 99562e3a chore: release eza v0.18.11
❯ cargo install --path .
 Installing eza v0.18.11 (/root/eza)
    Updating crates.io index
[OMITTED FOR BREVITY]
   Compiling git2 v0.18.3
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
   --> src/fs/file.rs:740:24
    |
740 |         NaiveDateTime::from_timestamp_opt(self.metadata.ctime(), self.metadata.ctime_nsec() as u32)
    |                        ^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: `eza` (lib) generated 1 warning
warning: unused imports: `DisplayWidth`, `TextCellContents`, `TextCell`
 --> src/output/mod.rs:2:22
  |
2 | pub use self::cell::{DisplayWidth, TextCell, TextCellContents};
  |                      ^^^^^^^^^^^^  ^^^^^^^^  ^^^^^^^^^^^^^^^^
  |
note: the lint level is defined here
 --> src/main.rs:7:9
  |
7 | #![warn(unused)]
  |         ^^^^^^
  = note: `#[warn(unused_imports)]` implied by `#[warn(unused)]`

^[warning: `eza` (bin "eza") generated 2 warnings (1 duplicate) (run `cargo fix --bin "eza"` to apply 1 suggestion)
    Finished release [optimized] target(s) in 7m 35s
   Replacing /root/.cargo/bin/eza
    Replaced package `eza v0.18.10 (/root/eza)` with `eza v0.18.11 (/root/eza)` (executable `eza`)

@clavelm clavelm added the question Further information is requested label Apr 19, 2024
@MartinFillon
Copy link
Contributor

Hey thanks for bringing up attention to this, we will have a look at them asap

@MartinFillon
Copy link
Contributor

could you tell me your os and rust version please.

@clavelm
Copy link
Author

clavelm commented Apr 19, 2024

Rust was not updated when I submitted this issue, and the unused imports warning came from that.

I’m building on an ubuntu running in a docker container.

❯ uname -a
Linux a9f4dea95e00 4.4.302+ #69057 SMP Fri Jan 12 17:02:28 CST 2024 x86_64 x86_64 x86_64 GNU/Linux

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

In ~:

❯ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)

In my local eza repo, overridden by './rust-toolchain.toml':

❯ rustc --version
rustc 1.70.0 (90c541806 2023-05-31)
❯ cargo install --path .
  Installing eza v0.18.11 (/root/eza)
    Updating crates.io index
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
   --> src/fs/file.rs:740:24
    |
740 |         NaiveDateTime::from_timestamp_opt(self.metadata.ctime(), self.metadata.ctime_nsec() as u32)
    |                        ^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: `eza` (lib) generated 1 warning
warning: `eza` (bin "eza") generated 1 warning (1 duplicate)
    Finished release [optimized] target(s) in 7.21s
   Replacing /root/.cargo/bin/eza
    Replaced package `eza v0.18.11 (/root/eza)` with `eza v0.18.11 (/root/eza)` (executable `eza`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants