joshuto
joshuto copied to clipboard
[Bug Report] could not compile 'trash' (Android Termux)
I use command 'cargo install joshuto' to compile the project, but unable to finish compile due to the bug:
After delete all things about 'trash', the project compile and run successfully.
Quickly checked the code of "Trash2.1.5", it should be a platform compatibility issue.
For now, the fix is to disable the feature recycle_bin
inside Cargo.toml
.
A future solution could be to only allow this feature on platforms that trash
supports.
For now, the fix is to disable the feature
recycle_bin
insideCargo.toml
new error on trying to do exactly this. am i just disabling the feature wrong? i tried, in Cargo.toml:
- deleting every line with the word "trash" on it
- deleting the
recycle_bin
line in[features]
- setting
recycle_bin = []
- setting
default = ["devicons", "mouse", "syntax_highlight"]
- running
cargo build --target aarch64-linux-android --no-default-features --features "devicons,mouse,syntax_highlight"
in my shell - trying to diagnose the problem with
cargo tree -e features -i joshuto
here's the error
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/io/io_worker.rs:328:9
|
328 | trash::Error::Unknown { description } => {
| ^^^^^ use of undeclared crate or module `trash`
|
help: consider importing one of these items
|
1 + use ansi_to_tui::Error;
|
1 + use core::error::Error;
|
1 + use core::fmt::Error;
|
1 + use crate::io::io_worker::io::Error;
|
and 15 other candidates
help: if you import `Error`, refer to it directly
|
328 - trash::Error::Unknown { description } => {
328 + Error::Unknown { description } => {
|
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/io/io_worker.rs:331:9
|
331 | trash::Error::TargetedRoot => {
| ^^^^^ use of undeclared crate or module `trash`
|
help: consider importing one of these items
|
1 + use ansi_to_tui::Error;
|
1 + use core::error::Error;
|
1 + use core::fmt::Error;
|
1 + use crate::io::io_worker::io::Error;
|
and 15 other candidates
help: if you import `Error`, refer to it directly
|
331 - trash::Error::TargetedRoot => {
331 + Error::TargetedRoot => {
|
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/io/io_worker.rs:359:25
|
359 | if let Err(e) = trash::delete(path) {
| ^^^^^ use of undeclared crate or module `trash`
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/error/error_type.rs:59:11
|
59 | impl From<trash::Error> for JoshutoError {
| ^^^^^ use of undeclared crate or module `trash`
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/error/error_type.rs:60:18
|
60 | fn from(err: trash::Error) -> Self {
| ^^^^^ use of undeclared crate or module `trash`
error[E0433]: failed to resolve: use of undeclared crate or module `trash`
--> src/io/io_worker.rs:326:33
|
326 | fn trash_error_to_io_error(err: trash::Error) -> std::io::Error {
| ^^^^^ use of undeclared crate or module `trash`
Should be fixed in 461f09532ca9cb8b104b03927843e48779747d7d
by disabling the recycle_bin
flag