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

fix builds on android #877

Merged
merged 1 commit into from
May 8, 2024
Merged

fix builds on android #877

merged 1 commit into from
May 8, 2024

Conversation

dead10ck
Copy link
Contributor

@dead10ck dead10ck commented May 7, 2024

Since #803 introduced a dependency on the trash crate, broot does not compile any more on Android. This change makes the trash crate only pulled in on platforms which support it, and otherwise the trash command displays an error.

Fixes #861

@Canop
Copy link
Owner

Canop commented May 7, 2024

From the test output, it looks like there are places missing some #[cfg(feature=trash)] guard.

@dead10ck
Copy link
Contributor Author

dead10ck commented May 7, 2024

Looks like attributes from the build script can't be used for dependency resolution, so it wasn't pulling in the dependency

@Canop
Copy link
Owner

Canop commented May 7, 2024

Instead of trying to compute when a feature really can be computed, I usually prefer to have the feature be explicitely specified. Look at how it's done for the "clipboard" feature: the compile script explicitely passes the chosen features.

Since Canop#803 introduced a dependency on the trash crate, broot does not
compile any more on Android. This change makes the trash crate only
pulled in on platforms which support it, and otherwise the trash command
displays an error.
@dead10ck
Copy link
Contributor Author

dead10ck commented May 7, 2024

Ah ok that works too; I changed it.

@Canop Canop merged commit f1b0dab into Canop:main May 8, 2024
1 check passed
@Canop
Copy link
Owner

Canop commented May 8, 2024

Thanks, merged.

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

Successfully merging this pull request may close these issues.

Does not compile on Termux (Android) any more
2 participants