-
Notifications
You must be signed in to change notification settings - Fork 25
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
Broken dependency resolution on non-Linux unixes #40
Comments
Feel free to ping me in January if I don't get back until then, because I would be willing to fix this, but not in the coming days. |
Thanks very much for reporting, and thanks @ArturKovacs for offering help, it's all very much appreciated. To get a little more acquainted with the code-base I took a stab at it myself and released a fix. Now the directives match so I'd hope this also fixes the related issue in |
Thank you for taking good care of this repo @Byron ❤️ |
Thanks for the quick fix and I'm glad I could help. I was originally inclined to reported this as a dua bug because I use trash-rs in my own crates (thanks @ArturKovacs!) and haven't had issues compiling on FreeBSD but I just checked and it's because I opted into using trash 1.3 because of the guidance that was in the README at the time (details of which I cannot precisely recall at the moment). Sorry to report that build still fails on non-Linux because of a different issue (unsafe use of Linux-only getmntent). There's an alternative way available on the BSDs (and macOS) but it means the code in freedesktop.org will no longer be free of conditional compilation. |
Step by step. If you could post the details here maybe a fix can be created from that. It might also be useful to try and run CI on FreeBSD, which doesn't seem to be straightforward yet. So I guess we have to go step by step here, maybe it's easiest if @mqudsi would submit a PR that is proven to work. |
Just ran into this issue on FreeBSD too.
The easiest way to do CI for FreeBSD is with Cirrus CI. It's free for open source |
In
Cargo.toml
,chrono
is declared as a dependency only under Linux:trash-rs/Cargo.toml
Lines 36 to 37 in 3c566ef
But it is used in the Freedesktop backend without a Linux-only precondition:
trash-rs/src/freedesktop.rs
Line 18 in 3c566ef
And the Freedesktop backend is used for any non-macOS unix target:
trash-rs/src/lib.rs
Lines 33 to 35 in 3c566ef
This causes the build to fail when compiled on a non-Linux unix-ish platform like FreeBSD.
The conditional dependency logic in Cargo.toml needs to match your actual use.
The text was updated successfully, but these errors were encountered: