Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.35k stars 226 forks source link

Does not compile on Termux (Android) any more #861

Closed dead10ck closed 2 months ago

dead10ck commented 3 months ago

Since #803 introduced a dependency on the trash crate, broot does not compile any more, presumably because Android does not have a trash.

error[E0433]: failed to resolve: use of undeclared crate or module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/trash-3.3.1/src/lib.rs:67:35
   |
67 |         Self { platform_specific: platform::PlatformTrashContext::new() }
   |                                   ^^^^^^^^ use of undeclared crate or module `platform`

error[E0433]: failed to resolve: use of undeclared crate or module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/trash-3.3.1/src/lib.rs:63:24
   |
63 |     platform_specific: platform::PlatformTrashContext,
   |                        ^^^^^^^^ use of undeclared crate or module `platform`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `trash` (lib) due to 2 previous errors

Ideally trash support would be behind a feature so that there is a way to opt out of this feature on platforms which do not have a trash. The feature could be on by default since most major platforms do, but at least it would be easy to make builds on platforms that do not.

Canop commented 3 months ago

Ideally trash support would be behind a feature so that there is a way to opt out of this feature on platforms which do not have a trash. The feature could be on by default since most major platforms do, but at least it would be easy to make builds on platforms that do not.

This looks good. Do you prefer to make a PR or that I do it ?

dead10ck commented 3 months ago

Cool, thanks for your support. I can make a PR when I get some time.