C++ Package Manager - C++ Dependencies Don't Have To Be Painful! - Augustin Popa

Поділитися
Вставка
  • Опубліковано 11 лют 2023
  • cppcon.org/
    ---
    C++ Dependencies Don’t Have To Be Painful - Why You Should Use a Package Manager - Augustin Popa - CppCon 2022
    github.com/CppCon/CppCon2022
    According to recent surveys from the Standard C++ Foundation, a majority of C++ developers are manually managing their library dependencies. Curiously, one of the top pain points cited in these surveys was also “managing libraries”. I believe these two points are correlated.
    In this talk, I will discuss how different types of package managers address these pain points, from system package managers like apt and Homebrew to build system centric package managers like NuGet and language package managers like vcpkg and Conan. There are pros and cons to every solution, and some package managers are more effective in some workflows than others. Managing libraries doesn’t have to be painful. If you configure your workflow right, you will save time not having to maintain additional git submodules, source code, or reading build instructions on GitHub.
    I’ll also talk about a few scenarios related to dependency management: acquiring open-source libraries vs. private libraries, automatically building libraries from source, using libraries locally and in CI, using libraries with different build systems and operating systems, and acquiring developer tools from a package manager. You will come out of this talk with an understanding of how a package manager can rid you of your dependency woes.
    ---
    Augustin Popa
    Augustin is a Product Manager on the C++ team at Microsoft, working on vcpkg and Visual Studio setup. In the past he has worked on the Visual Studio productivity and getting started experiences.
    __
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    UA-cam Channel Managed by Digital Medium Ltd events.digital-medium.co.uk
    #cppcon #programming #dependencies
  • Наука та технологія

КОМЕНТАРІ • 10

  • @AxWarhawk
    @AxWarhawk Рік тому +1

    What's the recommended way of adding a project-specific patch to a dependency when using vcpkg? Say, for instance, my project is using EASTL and I've found a non-trivial bug in one of their container implementations. Of course I'll submit a bug report, which will hopefully be resolved with the next release; but what do I do in the meantime? I can put together a workaround that fixes the issue for my project, but how do I communicate that patch to vcpkg? Do I need to fork and host a copy of EASTL, with my workaround applied? Or can I instruct vcpkg to always build EASTL from source and include this patch over here?

  • @retropaganda8442
    @retropaganda8442 Рік тому +3

    I think I've already seen this presentation some months ago. It goes on to describe what Linux distros have been doing for thirty years, except they go beyond just one programming language.

  • @GilbertoMadeira83
    @GilbertoMadeira83 Рік тому +8

    "cpp dependencies don't have to be painfull..." 1 hour video lenght scares me, Java has maven, c# has nuget, nodejs has npm, why is It so difficult to come up with a simple solution for cpp?

    • @motbus3
      @motbus3 Рік тому +2

      What is simple is CPP? :(

    • @Adowrath
      @Adowrath Рік тому +3

      Easiest part: Because Java and C# compile to Bytecode, JS doesn't compile at all. Basically the only problem discussed in this that applies to either of those is the diamond dependency version problem.
      The story for C++ is so much more complicated because it can do so much more. It doesn't offer one single target to compile down to, it offers several - not just different architectures like x86 vs ARM and such, but also for stuff like SIMD-Extensions on x86 platforms. Some libraries offer optional features that you can specify with flags to the library that are otherwise stripped for optimization: You don't ever need to handle ogg files with your ffmpeg? Great, you can tell it to not include ogg support! Or imagine a library that can work in both an exception-based and an exception-free world - can also be configured with a flag. What if a library has a dependency not on a specific one, just one fulfilling certain requirements - some regex backends, or a linear constraints solver like Z3 and others, are examples where I've seen this used. Flags flags flags.
      Oh and of course, do you want to build with static or dynamic linking? Position-Independent Code or not? What if some library isn't built for PIC but the others are? The only other build system I know that has a flag system like that are Rust's Cargo, and Haskell's Cabal.
      And don't even get me started on the possibilities that macros in general provide in C++ for selectively including/excluding/swapping different parts of code.
      It's not easy, not in the slightest, but with it comes incredible adaptibility to the target platform(s), usage scenarios etc. The tradeoff is that you barely can do any of those things I mentioned within C#, Java or NodeJS, at least not at compile time - yes SLF4J provides abstraction from your log implementation, but that only works because of the JVM Runtime facilitating the discovery.
      PS: Java doesn't just have Maven. You forgot about Ant, Gradle, and the Scala/Java hybrids SBT and Mill, and I'm sure there's others that aren't niche out there too.

  • @nirajandata
    @nirajandata Рік тому

    is live videos on cppcon prerecorded?

  • @motbus3
    @motbus3 Рік тому +3

    Isn't there Conan?

    • @PixelThorn
      @PixelThorn 5 місяців тому

      Yeah but apparently ver. 2.0 made it pretty good to awful

  • @retropaganda8442
    @retropaganda8442 Рік тому +4

    When do you merge efforts with Conan ?

  • @pynchia4119
    @pynchia4119 2 місяці тому

    Get some sleep Augustin! You do look exhausted. Don't kill yourself for Msoft