I use Arch btw

  • trem@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    2
    ·
    8 hours ago

    In ‘proper’ software development projects, you (ideally) want all information checked into the repo for what is needed to run the software:

    • which dependencies you need,
    • what particular versions of the dependencies,
    • as well as which runtime/compiler version to use.

    And then you’d use a package manager which can automatically install all these.
    Python projects are currently heavily moving towards uv for this. Traditionally, you’d use pip + virtualenv + sometimes pipx for this.

    Using nix develop with flakes is also valid for this, if your team agrees on it: https://nixos.wiki/wiki/Development_environment_with_nix-shell#nix_develop

    Whichever way you solve it, the idea is that:

    1. You can check out a commit from months ago and just run it right away. Well, or just a commit from yesterday, which is on a different Git branch, where you haven’t yet started your big dependency upgrade. As soon as upgrading a dependency requires changes in your code, you want the dependency version change tracked together with the respective code change.
    2. Your different team mates can all work on the repository, even though one of them might be on Debian, the next on Arch and the third is on macOS. By defining all your dependencies in the repo, you can avoid “works on my machine” scenarios, where a bug occurs on one PC, but not on the dev’s PC where you try to reproduce it.