• grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 year ago

    and avoid needing to install all of their dependencies locally

    Wait, but doesn’t it result in more copies of the dependencies being installed locally because they’re duplicated for each application?

      • JoeyJoeJoeJr@lemmy.ml
        link
        fedilink
        arrow-up
        6
        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.

    • jj4211@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      I’ll give flatpak and snap one thing: they did make some concession to avoiding duplication, unlike docker which utterly duplicates everything.

      With flatpak and snap, applications can depend on/pull in a maintained external layer. So you might want ‘gnome environment, version 43’ and other applications that want that can all share. That layer can be updated independently of dependencies. You might have two instances of the gnome layers (say 43 and 44) due to different applications declaring different versions, but it’s not too bad.

      Now there is some duplication, some libraries that an app says “oh, no particular layer for this one, fine I’ll just bundle it”. But at least there’s a mechanism to not necessarily do that for everything.