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

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024
  • cppcon.org/
    ---
    C++ Dependencies Don’t Have To Be Painful - Why You Should Use a Package Manager - Augustin Popa - CppCon 2022
    github.com/Cpp...
    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
    TH-cam Channel Managed by Digital Medium Ltd events.digital...
    #cppcon #programming #dependencies

ความคิดเห็น • 11

  • @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 ปีที่แล้ว +9

    "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 ปีที่แล้ว +4

      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.

  • @retropaganda8442
    @retropaganda8442 ปีที่แล้ว +5

    When do you merge efforts with Conan ?

  • @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?

  • @motbus3
    @motbus3 ปีที่แล้ว +3

    Isn't there Conan?

    • @PixelThorn
      @PixelThorn 10 หลายเดือนก่อน

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

  • @nirajandata
    @nirajandata ปีที่แล้ว

    is live videos on cppcon prerecorded?

  • @TheGodfather101
    @TheGodfather101 หลายเดือนก่อน +1

    They all suck. i thought conan was okay atleast i made it to code. until dll's started mysteriously going missing. Mysys, vcpckg. its all TRASH.

  • @pynchia4119
    @pynchia4119 7 หลายเดือนก่อน

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