[cfe-dev] Filesystem has Landed in Libc++

Louis Dionne via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 27 14:02:15 PDT 2018


Eric,

I’m curious to know what the concerns are w.r.t. providing ABI stability for filesystem right now. What do you envision may require changing the ABI in the future?

I feel like taking filesystem out of experimental/ without providing the usual guarantees provided by libc++ for non-experimental code may not be a good idea, as we’ll be pretending that we support filesystem when we really only half support it. In other words, I think the number of people that will start using filesystem while _consciously_ knowing that it is ABI-unstable (and what that means) is quite small, and that is making our users a disservice.

Would it be possible to instead ship the parts we’re not quite sure we can keep ABI stable in the headers (with `_LIBCPP_HIDE_FROM_ABI`) for the time being, and lower them to the dylib eventually as things stabilize? This would allow us to ship filesystem with LLVM 7.0 without any compromise on the guarantees we make our users.

I’m curious to know what you think of this suggestion.
Louis

> On Jul 27, 2018, at 00:20, Eric Fiselier via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi All,
> 
> I recently committed <filesystem> to trunk. I wanted to bring attention to some quirks it currently has.
> 
> First, it's been put in a separate library, libc++fs, for now. Users are responsible for linking the library when they use filesystem.
> 
> Second, it should still not be considered ABI stable. Vendors should be aware of this before shipping it. Hopefully all the standard and implementation bugs can be resolved by the next release, and we can move it into the main dylib.
> 
> Third, libc++experimental no longer contains the symbols for <experimental/filesystem>, which is really just <filesystem> is disguise. If you've been using <experimental/filesystem> you now need to link libc++fs instead.
> 
> Fourth, `<filesystem>` is technically available in C++11 and later. The implementation lives in the std::__fs::filesystem namespace, which is marked "inline" in C++17 but not before. We should consider documenting this as an extension to its use w/o C++17.
> 
> Happy coding,
> 
> /Eric
> 
> [1] http://libcxx.llvm.org/docs/UsingLibcxx.html#using-filesystem-and-libc-fs <http://libcxx.llvm.org/docs/UsingLibcxx.html#using-filesystem-and-libc-fs>_______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180727/b8966bf8/attachment.html>


More information about the cfe-dev mailing list