▲ | aidenn0 4 days ago | |||||||
I think you missed the point of the article. Consider Application A, that depends on Library L1. Library L1 in turn depends on Library L2: A -> L1 -> L2 They are saying that A should not need a lockfile because it should specify a single version of L1 in its dependencies (i.e. using an == version check in Python), which in turn should specify a single version of L2 (again with an == version check). Obviously if everybody did this, then we wouldn't need lockfiles (which is what TFA says). The main downsides (which many comments here point out) are: 1. Transitive dependency conflicts would abound 2. Security updates are no longer in the hands of the app developers (in my above example, the developer of A1 is dependent on the developer of L1 whenever a security bug happens in L2). 3. When you update a direct dependency, your transitive dependencies may all change, making what you that was a small change into a big change. (FWIW, I put these in order of importance to me; I find #3 to be a nothingburger, since I've hardly ever updated a direct dependency without it increasing the minimum dependency of at least one of its dependencies). | ||||||||
▲ | yawaramin 4 days ago | parent | next [-] | |||||||
> Transitive dependency conflicts would abound They would be resolved by just picking the version 'closest to root', as explained in the article. > Security updates are no longer in the hands of the app developers It is, the app developers can just put in a direct dependency on the fixed version of L2. As mentioned earlier, this is the version that will be resolved for the project. > When you update a direct dependency, your transitive dependencies may all change, making what you that was a small change into a big change. This is the same even if you use a lockfile system. When you update dependencies you are explicitly updating the lockfile as well, so a bunch of transitive dependencies can change. | ||||||||
| ||||||||
▲ | hosh 4 days ago | parent | prev [-] | |||||||
Is the article also suggesting that if there are version conflicts, it goes with the top level library? For example, if we want to use a secure version of L2, it would be specified at A, ignoring the version specified by L1? Or maybe I misread the article and it did not say that. | ||||||||
|