Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Daan De Meyer
    @DaanDeMeyer
    Although CMake config files are a contender as well with meson adding support for them
    Boris Staletic
    @bstaletic
    C++ committee did form a tooling study group.
    Daan De Meyer
    @DaanDeMeyer
    But if something was ever standardized it would very likely be something declarative instead of CMake config files which are imperative
    Boris Staletic
    @bstaletic
    I dislike declarative configuration with passion.
    At some point the cumulative needs of the users will make you wish you had a turing complete language instead of ad-hoc solutions in the "it's good enough" declarative language.
    Daan De Meyer
    @DaanDeMeyer
    Same, although the scons build system at my job hasn't made me fond of a full programming language for build systems either
    Boris Staletic
    @bstaletic
    I haven't used scons, so I'll have to take your word for it.
    However, I'm guessing you remember how much I talked about YCM's .ycm_extra_conf.py.
    Daan De Meyer
    @DaanDeMeyer
    I do remember you mentioning it but not the specifics
    It's a python script for configuring YCM right?
    Boris Staletic
    @bstaletic
    Yes. YCM passed a filename to it and a function inside the file returns { 'flags': [ flags ] } (with a few other optional properties).
    When compile_commands.json is too limiting, YCM users can solve that by implementing thte logic in the extra conf.
    Daan De Meyer
    @DaanDeMeyer
    Making scons generate a compilation database was quite the adventure, I still don't have it quite where I want it. All headers are copied to a rootfs in the build directory by the build so each time I hit go to definition I end up in the build directory. I'm working on making that symlinks which clangd should be able to handle
    It's a shame cquery winded down but clangd has been getting more amazing with every release
    Boris Staletic
    @bstaletic
    Things I miss in clangd:
    Daan De Meyer
    @DaanDeMeyer
    The first one seems hard to implement. clangd would need some way to correlate the separate files with the actual file that's compiled
    Boris Staletic
    @bstaletic
    Libclang API supports that.
    Support for that in our libclang completer was quite an intrusive change.
    And we didn't have to worry about the index.
    Daan De Meyer
    @DaanDeMeyer
    I can imagine it was, props for adding support for something like that
    If only a bit more thought was put into the compile_commands.json format when it was invented
    It could have been more flexible to support these use cases
    Boris Staletic
    @bstaletic
    It's basically the only way to get support for unity builds. I.e.
    // A.cpp
    int x;
    // B.cpp
    x++;
    // only_compile_this.cpp
    #include <A.cpp>
    #include <B.cpp>
    x--;
    Now you open B.cpp and get errors, because x was never declared.
    Daan De Meyer
    @DaanDeMeyer
    A comment in the CMake release thread mentioned unity builds breaking compile_commands.json
    Boris Staletic
    @bstaletic
    With clangd/clangd#45 you can say "when I open B.cpp, parse it as if TU main file was only_compile_this.cpp".
    Daan De Meyer
    @DaanDeMeyer
    That actually seems feasible to add to compile_commands.json without thinking it through in detail
    Boris Staletic
    @bstaletic
    It should be. Add an optional field called override_filename.
    Daan De Meyer
    @DaanDeMeyer
    Yup, and it's optional so most tools should keep working
    Boris Staletic
    @bstaletic
    That would leave only some obscure uses for the YCM's extra confs. Like executing make flags $FILEPATH to get the flags.
    Yes, I've seen that done.
    Daan De Meyer
    @DaanDeMeyer
    Anything is justified to get compilation errors (and warnings) in my editor
    Any idea on this one?
    Boris Staletic
    @bstaletic
    No, but I'd suggest not doing stupid things and having more than one standard library in your include path.
    Daan De Meyer
    @DaanDeMeyer
    The thing is, clang finds everything without even having an include path available. I'm wondering how it's doing that
    Boris Staletic
    @bstaletic
    Daan De Meyer
    @DaanDeMeyer
    I supposed they could use vswhere if the MSVC version is recent enough but failing that I don't think there's another option besides heuristics
    Boris Staletic
    @bstaletic
    Luckily for ycmd, macOS tends to break our heuristics with each release, though we were spared with the latest release.
    Daan De Meyer
    @DaanDeMeyer
    macOS support in reproc did require fixing some interesting issues
    For example, having to use kqueue instead of sigtimedwait because the latter one isn't implemented.
    Boris Staletic
    @bstaletic
    I'm currently having troubles getting python library "watchdog" to work on mac.
    Daan De Meyer
    @DaanDeMeyer
    Watching fs changes seems like something that can go wrong in many ways
    Boris Staletic
    @bstaletic
    It works. All my tests pass. The watchdog thread just never joins.
    Only on mac...
    I came upon this yesterday which isn't very positive either
    Boris Staletic
    @bstaletic
    That sounds just wonderful.
    Someone dug up the clang logic on Windows
    Alvaro Moran
    @dirac3000
    Hi, I have a question on how to use reproc++ and read a child process output while the child is waiting for an input