News for hackers. Stuff that matters.
Re:New Pip resolver takes a long time to complete by jrochkind1 on Thursday December 03, 2020 @06:40PM (#25297018)
If they are specifying exact hard-coded dependency versions... if a X -> Y -> A, and B -> A, and M -> N -> A... and a security patch is released for A, then X, Y, B, M and N all need new releases to specify new exact dependencies, in order to use the new A'?

It's disastrous for security patches, only highly inconvenient for things like performance improvement releases. But this is why we have dependency resolving, right? What am I missing?

Re:New Pip resolver takes a long time to complete by cbaines on Friday December 04, 2020 @03:59AM (#25300380)
No, you just update the package definition for A and release the updated package definitions, people will then be using the updated A, whether directly or through other packages (X, Y, B, M, N, ...).

There is an issue here of rebuilding all those dependent packages with the updated A, especially if it's something like glibc. Guix includes a mechanism called grafts that allows for package replacements, which allows avoiding this, and this is often used for releasing security fixes.

Re:New Pip resolver takes a long time to complete by jrochkind1 on Friday December 04, 2020 @10:32AM (#25303352)
I think I must be misunderstanding. When you said:

> you're right in that normally package definitions specify the exact dependencies it the code (they're hardcoded).

I thought that meant that package X might specify a dependency on A version 2.4.2 exactly. So if you want it to use A 2.4.3 instead, a new release of package X would have to be created, specifying 2.4.3.

But I think this is not in fact what you mean? In which case I don't yet understand the system you are describing and what you mean by not doing dependency resolution.

Re:New Pip resolver takes a long time to complete by danieldk on Friday December 04, 2020 @11:09AM (#25303889)
I thought that meant that package X might specify a dependency on A

In Nix and Guix, you would indeed not specify that X needs package A version 2.4.2. You could see it as X using the 'build recipe' of A as its dependency. So, if you bump the version of A to 2.4.3, then all packages that use A as a dependency will be rebuilt (or substituted from the a binary cache if the Guix/NixOS build infrastructure has already built the updated packages).

Re:New Pip resolver takes a long time to complete by jrochkind1 on Friday December 04, 2020 @12:43PM (#25305359)
Huh, in that case I have the converse question -- when specifying dependencies for X, can you not say A 1.x but not 2.x, because 2.x has or is expected to have backwards breaking changes? Otherwise, when A releases 2.0 with some backwards incompatibilities, and all packages that use A as a dependency are rebuilt, don't they break?

These issues (allow updates within limits) are what I understand as the point of dependency resolution, I'm trying to understand how you do without it.

Re:New Pip resolver takes a long time to complete by danieldk on Saturday December 05, 2020 @02:31AM (#25312620)
These issues (allow updates within limits) are what I understand as the point of dependency resolution, I'm trying to understand how you do without it.

In such a case e.g. nixpkgs makes two attributes: a_1 and a_2 (and alias a to a_2). Packages that still require A 1.x will have a_1 as one of their dependencies, the rest a.

This is avoided as much as possible, but is sometimes necessary. Common examples are Gtk 2 applications or C/C++ applications that can only be built against a Python 2 interpreter.