Open COM8 opened 1 year ago
@cpsauer sorry for the delayed response. I was on vacation.
Don't worry. This is how developing software works. It's an iterative process pushing it to a better and better state. Back then using boost::filesystem
sounded like the right way to go and it worked (mostly) so I'm happy 😁.
To me https://github.com/gulrak/filesystem looks like a well maintained and by far more compatible replacement for std::filesystem
so I also agree we should move to it sooner than later.
I can look into porting our code over to it soon. Probably in the next two weeks or since I'm catching up with stuff right now.
For now I created an issue for it, so we do not forget about it.
Thank you very much for looking into this and preparing everything required in https://github.com/gulrak/filesystem/pull/167.
np at all. hope you had a great one, and thanks for being great, as always, Fabian.
Since I wrote that, I've pushed up the wrapping of ghc::filesystem for bazel and switched things over on the Bazel side with a little patch. Lmk if you want me to help tactically on migrating here--though I should really still defer to your comparative advantage on cmake. Happy to spin up a draft PR that we could collaborate on--or you could give me access to wherever you're working on it?
A couple additional notes from things I learned that might speed things along:
#include "ghc/fs_std.hpp"
, for Bazel I opted to use ghc::filesystem in non-header-only mode, #including "ghc/fs_std_fwd.hpp" from filesystem.h, and then creating a cpp file that compiles via #include "ghc/fs_std_impl.hpp"
. My thinking was: it would save users some compile time, Bazel makes it easy to grab remote code and have dependencies that aren't header only, and libcpr is already not header only. LMK what you think on the cmake side. I'm not sure how easy it is to do the equivalent grab-a-remote-dependency action in cmake.
I really think we should backport std::filesystem with https://github.com/gulrak/filesystem instead of boost::filesystem.
gulrak/filesystem is std::filesystem-compatible (and header-only), sidestepping a lot of the pain we were getting in my other project from the API differences between boost::filesystem and std::filesystem. I'm guessing it'll save you a lot of API-divergence pain, too, as code continues to build on filesystem.
What do you think?
Some notes:
Cheers! Chris
P.S. Wish I'd steered us to this straight away when I saw someone had added the broken boost backport...sorry I just learned about it.
Originally posted by @cpsauer in https://github.com/libcpr/cpr/issues/929#issuecomment-1653008950