libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.56k stars 934 forks source link

Switch to gulrak/filesystem #938

Open COM8 opened 1 year ago

COM8 commented 1 year ago
          Hey, Fabian, after some more research, I think I should update my recommendation here: 

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

COM8 commented 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.

cpsauer commented 1 year ago

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: