woah that’s pretty cool!
I do concur; well done!
@alexmiller Now updated the gist, it prints warnings like a linter: https://gist.github.com/borkdude/2b963db1582654ec28bfd40b4dc35748
clojure/pprint/cl_format.clj:168:1: warning: Arity 1 of clojure.pprint/format-simple-number was removed.
clojure/core_deftype.clj:572:1: warning: Arity 4 of clojure.core/emit-method-builder was removed.
clojure/core/reducers.clj:24:1: warning: clojure.core.reducers/compile-if was removed.
It will print warning
when there a change to a private function and error
when there is public breakage.
So no breakage detected between Clojure 1.8 and 1.10.1 ;)It uses the locations of the the older version, since you cannot refer to the location of something that is removed.
Just as an example, suppose 1.9.0 was newer than 1.10.1, then you would expect the tool to print errors for some vars:
$ /tmp/api_diff.clj org.clojure/clojure "1.10.1" "1.9.0"
clojure/core.clj:6082:1: error: clojure.core/requiring-resolve was removed.
clojure/instant.clj:281:1: error: Arity 1 of clojure.instant/read-instant-calendar was removed.
clojure/core.clj:6073:1: warning: clojure.core/serialized-require was removed.
...
Now we need a next_version
tool that bumps the current version according to semantic versioning and these diffs 😏
Also made a babashka version now. 75 lines of "clojure" with fast startup, that downloads all the deps for you and prints break warnings. https://gist.github.com/borkdude/ba372c8cee311e31020b04063d88e1be
I just wrote a GitHub action to do a SemVer version bump against a pom based on commit messages. If you want to steal the bash for that, here's a link: https://www.github.com/nnichols/maven-version-bump-action/tree/master/version-bump.sh If I recall correctly, leiningen has its own tool/command for version bumps against project.clj files. I may have an example of that tucked away somewhere, but I'll have to do some digging to find it
@hkjels here is the same script, but using leiningen’s native command to do the version bumping. I’ll create a similar GitHub action for lein-based projects
https://github.com/Wall-Brew-Co/common-beer-format/blob/master/bin/verchg
@borkdude you can add org.slf4j/slf4j-nop {:mvn/version \"1.7.30\"}
to get rid of the slf4j warnings
@alexmiller added