Byron / trash-rs

A Rust library for moving files to the Recycle Bin
MIT License
170 stars 28 forks source link

Restore statfs for FreeBSD & OpenBSD #87

Closed 0323pin closed 1 year ago

0323pin commented 1 year ago

Fixes https://github.com/Byron/trash-rs/issues/86

@Byron Probably possible to simplify but, let's wait for a confirmation in the referenced issue.

Byron commented 1 year ago

Thanks for the fix.

CI really needs an upgrade as these targets aren't tested, and I can't validate the code myself either. If issues keep arising, and in absence of CI, it would probably be better to remove support for these platforms than to carry on with them.

0323pin commented 1 year ago

Thanks!

it would probably be better to remove support for these platforms than to carry on with them

Please don't. Just ask, I can do test builds when required 🙏

Byron commented 1 year ago

Why can't CI be testing these platforms? Aren't other projects on GitHub doing this already, so a CI configuration example could be fetched from there?

Unless you are running all tests on FreeBSD and NetBSD as each commit in each PR happens, I don't think these platforms will be protected from regression. They also cost a disproportionate amount of my time right now.

Maybe they should be considered a different tier and breakage is simply allowed - what CI doesn't see doesn't exist.

0323pin commented 1 year ago

@Byron I understand your annoyance and I'm aware I was the one causing this issue.

My offer to run test builds is only due to the fact that I don't know how to set-up a CI.

Why can't CI be testing these platforms? Aren't other projects on GitHub doing this already, so a CI configuration example could be fetched from there?

Yes, Rust libc does this. Cirrus CI has support for all the 3 platforms discussed here. And, since this is a library not requiring any graphics, it could be straightforward to set-up something like trippy has. It's just that, I have no clue how to configure and set-up a CI 😢

Byron commented 1 year ago

Great, trippy can lead the way as it has netbsd at least, and a cross-setup to make it all work. To get started, you could enable CI in your fork, copy the CI configuration file from trippy and then adjust it so that cross runs tests instead of just building a binary.

I really think it will be time well spend to try to adapt the trippy CI to work with this project, and I am absolutely looking forward to a PR for this. You can do it :)!