• JoeyJoeJoeJr@lemmy.ml
    link
    fedilink
    arrow-up
    7
    arrow-down
    2
    ·
    1 year ago

    It’s actually less about the library being obscure, and more about version conflicts, which is actually more a problem with common libraries.

    For example, let’s say you want to install applications A, B, and C, and they each depend on library L. If A depends on Lv1, and B depends on Lv2, and C depends on Lv3, with traditional package management, you’re in a predicament. You can only have one copy of L, and the versions of L may not be compatible.

    Solutions like snap, flatpak, appimage, and even things like Docker and other containerization techniques, get around this issue by having applications ship the specific version of the library they need. You end up with more copies of the library, but every application has exactly the version it needs/the developer tested with.

    • Puzzle_Sluts_4Ever@lemmy.world
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Even a decade ago? Full agree and that is the source of a lot of my grey hairs.

      These days? People understand these problems… in large part because the devs are dealing with them too. So there is a much bigger focus on backwards compatibility within a given major (if not minor) release and version tagged libraries so that you can have libfoo.so.1.2.3.4 and libfoo.so.2.4.6.8 installed side by side with no issues.

      There are still definitely problem points and that is WHY containerization is more or less required for a production environment.

      But in the consumer environment? It is nice and good practice but it is nowhere near as important as it used to be.

      • JoeyJoeJoeJr@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        The age and obscurity of the library is irrelevant - you could always include libraries bundled with the app, if they didn’t exist in system repos. For example, in deb packages, you could include it in the data.tar portion of the package (see https://en.m.wikipedia.org/wiki/Deb_(file_format)).

        Libraries with version names baked in are one solution to the dependency hell problem, but that requires support from the language/framework/tooling to build the application, and/or the OS (or things get hacky and messy quickly).

        If you read that dependency hell page, you’ll see another solution is portable apps, which specifically mentions Appimage, Flatpak, and Snap.

        Additionally, if you read the Debian docs on How to Cope with Conflicting Requirements, the first solution they give is to “Install such programs using corresponding sandboxed upstream binary packages,” such as “Flatpak, Snap, or AppImage packages.”

        Bin the consumer environment? It is nice and good practice but it is nowhere near as important as it used to be.

        This is incorrect. The target audience for Flatpak is desktop users: https://docs.flatpak.org/en/latest/introduction.html#target-audience. Flatpaks are explicitly for consumer, graphical applications.