News for hackers. Stuff that matters.
Re:Writing a Package Manager by qwerty456127 on Wednesday August 23, 2023 @07:35AM (#37234337)
Why not just replace the "requires" semantics with "has passed tests with" and "has failed tests with" and let the host decide?
Re:Writing a Package Manager by throw10920 on Wednesday August 23, 2023 @08:17AM (#37234700)
In general: no reason, I quite like your idea and think that it's useful. However, in the specific case of the blog post: because that's more complexity, which requires more effort.

I suspect that the author would have added in a more complex versioning/dependency system if he had more time/energy. But, given that he didn't, he had to make a choice about what features to include, and how much to flesh out the various systems.

A simple "depend on exact version" system is relatively easy to implement, and still (indirectly) supports users overriding the lockfile by manually editing it. A more complex (but flexible) system like pip's or yours would be more ideal from a user's perspective - the developer just needs to put in the time to implement.

However, I don't think that any of the above systems are wrong, unlike e.g. one that only allows you to specify a specific version in the lockfile, but then silently downloads "updates" to those dependencies in the background.

Re:Writing a Package Manager by pxc on Wednesday August 23, 2023 @12:58PM (#37238927)
This is basically what I daydream about for Nix some day (Nixpkgs doesn't currently involve any dependency resolution at all). Just recording successful version combinations (both of a package declaration and source version and dependency versions) would let us add versioning metadata and save historical package versions in-repo (or in an ancillary repo) without actually changing how the monorepo is built/used.