3 ms·
> but there are also risks (the code breaking when the library gets updated). This is the entire point of Semantic Versioning: to communicate breaking changes
by deathanatos 9y ago
> but there are also risks (the code breaking when the library gets updated).
This is the entire point of Semantic Versioning: to communicate breaking changes through the version number, and to build tooling to programmatically avoid breaking dependent code.
(No, it isn't generally perfect: it does require that human realize what the API is that that a given change is breaking it. If we had some programmatic language for specifying the API… type systems start this, but tend to not capture everything¹)
¹I suspect there are some formal analysis folks who know more than I do here, screaming that there is a better way. I work in Python day-to-day, so generally, it's all on the human.
- gavinpc 9y agoSee this talk [0] about this addition to Clojure called core.spec [1]. I read the paper first, and it isn't until the end of the presentation that I understood how it was related to the feature at all. Basically, core.spec is a kind of formal verification tool designed to deal with the growth of software. It is not a type system, though it resembles one in some ways. The objective is to support comparisons between the signatures of a function at two different points and say, are these compatible? Is this a breaking change? You have to design for growth: make no assumptions about unspecified keys and always assume that later versions may return more than they used to. And so on. If you're a fan of semver, be warned. [0] https://www.youtube.com/watch?v=oyLBGkS5ICk https://www.youtube.com/watch?v=oyLBGkS5ICk https://news.ycombinator.com/item?id=13085952 [1] https://clojure.org/about/spec https://clojure.org/about/spec
- tedmiston 9y agoAnd freezing / pinning dependencies (and their dependencies...) to avoid deploying a version of a library you haven't already tested first.
- continuational 9y agoElm has automatic semantic versioning based on the type system: https://github.com/elm-lang/elm-package/blob/master/README.md https://github.com/elm-lang/elm-package/blob/master/README.m...