4 ms·
If there's a language that does this right, all ears? But I havn't seen it - The use case described is for a small one off script for use in CI, or a single f
by hannibalhorn 2y ago
If there's a language that does this right, all ears? But I havn't seen it -
The use case described is for a small one off script for use in CI, or a single file script you send off to a colleague over Slack. Very, very common scenario for many of us. If your script depends on
a => c
b => c
You can pin versions of those direct dependencies like "a" and "b" easy enough, but 2 years later you may not get the same version of "c", unless the authors of "a" and "b" handle their dependency constraints perfectly. In practice that's really hard and never happens.
The timestamp appraoch described above isn't perfect, but would result in the same dep graph, and results, 99% of the time..
- __s 2y agoRust tends to handle this well. It'll share c if possible, or split dependencies. Cargo.lock preserves exact resolution
- lmm 2y agoTry Scala with an Ammonite script like https://ammonite.io/#ScalaScripts https://ammonite.io/#ScalaScripts . The JVM ecosystem does dependencies right, there's no need to "pin" in the first place because dependency resolution is deterministic to start with. (Upgrading to e.g. all newer patch versions of your current dependencies is easy, but you have to make an explicit action to do so, it will never happen "magically")