tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2021-01-08T09:16:48.280800Z

woah that’s pretty cool!

2021-01-08T09:32:50.281200Z

I do concur; well done!

borkdude 2021-01-08T09:57:11.282800Z

@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 ;)

borkdude 2021-01-08T09:58:03.283300Z

It uses the locations of the the older version, since you cannot refer to the location of something that is removed.

borkdude 2021-01-08T10:01:02.284Z

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.
...

2021-01-08T10:06:54.285400Z

Now we need a next_version tool that bumps the current version according to semantic versioning and these diffs 😏

borkdude 2021-01-08T10:14:01.286Z

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

🎉 3
nnichols 2021-01-08T12:22:00.286800Z

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

1
nnichols 2021-01-08T14:39:51.287100Z

@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

alexmiller 2021-01-08T14:53:12.287900Z

@borkdude you can add org.slf4j/slf4j-nop {:mvn/version \"1.7.30\"} to get rid of the slf4j warnings

borkdude 2021-01-08T15:06:41.288200Z

@alexmiller added