eza-community / eza

A modern, maintained replacement for ls
https://eza.rocks
MIT License
8.76k stars 171 forks source link

"warning: unused imports: `DisplayWidth`, `TextCellContents'" #1024

Open hellishvictor opened 2 weeks ago

hellishvictor commented 2 weeks ago

Here on Win 7 x64 building i686 and x86_64 with pc-windows-msvc v1.77.2 it shows the following:

warning: unused imports: `DisplayWidth`, `TextCellContents`
 --> 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: unused import: `self::octal::Render as OctalPermissionsRender`
  --> src\output\render\mod.rs:43:9
   |
43 | pub use self::octal::Render as OctalPermissionsRender;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `eza` (bin "eza") generated 2 warnings (run `cargo fix --bin "eza"` to apply 2 suggestions)

Cheers.

PThorpe92 commented 2 weeks ago

Damn I don't believe there is a way to specify that those need to be solely for windows > 7, so because we have had so many issues with these particular imports we might have to add #[allow(unused_imports)] for this one.

thoughts @gierens @MartinFillon

daviessm commented 2 weeks ago

Personally I'd say that Windows <10 build 1507 isn't supported; extended security support for Windows 7 ended four and a half years ago!

https://endoflife.date/windows

hellishvictor commented 2 weeks ago

And the next year gonna be the end of life of Win 10, which is a real spyware meant to collect data on your activity and usage and send it back to Microsoft. On my Win 7 there's not ads or whatever that force me to update, and after of all these years it works rock solid. Here is lots of awesome developers like schollz that still support the users, with targets {x86_64,i686}-win7-windows-msvc.

As another user said: "Microsoft is a commercial company, so its decisions are dictated by profit. If the support does not promise profit, it will be canceled. It says nothing about the tool. A good hammer continues to hammer regardless of whether the warranty has expired. Microsoft calls it obsolete so that people get scared and run to spend money, and not because there is something revolutionary new in the new OSes (like 64-bit, NTFS instead of FAT32, and the ability to work with more than 4 GB RAM). This trick of capitalism is called planned obsolescence. But there are many users, especially outside relatively well-off places, who can't upgrade or don't care about support, because Windows 7 works properly without it. And I doubt there are any features in your Whois program that require a new OS — after all it's a simple network exchange, so it's a pity that you give up so easily and turn a blind eye to people’s pain."

hellishvictor commented 2 weeks ago

https://github.com/sharkdp/fd/issues/1550

daviessm commented 2 weeks ago

@hellishvictor if you'd like to provide patches to keep Windows 7 builds working without breaking any others, we're willing to review and include them!

MartinFillon commented 2 weeks ago

Damn I don't believe there is a way to specify that those need to be solely for windows > 7

Personally don't know anyway to do that.

because we have had so many issues with these particular imports we might have to add #[allow(unused_imports)] for this one.

The thing is that, technically its used because it is a reexport, but it is not used directly so depending on your rust implementation it will change. I personally think that reexports like that are not a great idea and you must always specify what you need, if possible in its most raw version. But I am not against some #[allow(unused_imports)] if needed