▲ | aidenn0 4 days ago | ||||||||||||||||||||||||||||
Now you're moving the goalposts; I think lockfiles that are checked-in to version control are superior to Maven's "Let's YOLO it if your transitive dependencies conflict." Version ranges are more expressive than single-versions, and when you add lockfiles you get deterministic builds. | |||||||||||||||||||||||||||||
▲ | deepsun 4 days ago | parent | next [-] | ||||||||||||||||||||||||||||
I don't understand how Maven's YOLO is different from NPM's range. If you force a transitive dependency in Maven, then yes, some other library may get incompatible with it. But in NPM when people declare dependency as, say, ~1.2.3 the also don't know if they will be compatible with a future 1.2.4 version. They just _assume_ the next patch release won't break anything. Yes npm will try to find a version that satisfies all declarations, but library devs couldn't know the new version would be compatible because it wasn't published at that time. And my point is that it's _exactly_ the same probability that the next patch version is incompatible in both Maven and NPM. That's why NPM users are not afraid to depend on ~x.x or even ^x.x, they basically YOLOing. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
▲ | cogman10 4 days ago | parent | prev [-] | ||||||||||||||||||||||||||||
Maven builds are deterministic (so long as you don't have SNAPSHOT dependencies). The version resolution is insane but deterministic. You'll only break that determinism if you change the dependencies. That's precisely because maven doesn't support version ranges. Maven artifacts are also immutable. Maven also supports manual override when the insane resolution strategy fails that's the "dependencymanagement" section. | |||||||||||||||||||||||||||||
|