tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2021-05-16T02:15:36.145500Z

Huh. A recent question on the Clojure Google group is fun in its implications for Clojure and its tools: Github and Maven projects whose names begin with a digit like this one: https://github.com/2captcha/2captcha-java https://search.maven.org/artifact/com.github.2captcha/2captcha-java

borkdude 2021-05-16T09:22:34.149300Z

I vote for the string lib name

1👍3➕
2021-05-16T02:17:32.146Z

Quickest workaround I can think of is to create a Java wrapper lib around it that avoids Clojure needing to see any names starting with a digit

seancorfield 2021-05-16T02:38:05.146200Z

It works just fine with Leiningen…

2021-05-16T02:43:31.146400Z

Hmm. I should have tried out more things before mentioning this. Sorry.

seancorfield 2021-05-16T02:44:19.146600Z

It doesn’t work with deps.edn because the EDN is invalid with the leading 2.

alexmiller 2021-05-16T02:44:31.146800Z

you can use whatever lib name you like in deps.edn

alexmiller 2021-05-16T02:44:43.147Z

oh, this is maven lib

seancorfield 2021-05-16T02:45:53.147700Z

If it was a :git/url or :local/root you mean @alexmiller?

alexmiller 2021-05-16T02:46:02.147900Z

yeah

alexmiller 2021-05-16T02:47:51.148100Z

well, happy to get an ask.clojure question to think about it

alexmiller 2021-05-16T03:11:13.148300Z

a wrapper wouldn't help as you'd still get it as a transitive dep

alexmiller 2021-05-16T03:14:05.148500Z

maven central doesn't have any groupIds that start with a number, but there are probably ~100 artifactIds that do

alexmiller 2021-05-16T03:14:56.148700Z

(which is a tiny percentage of maven central of course)

alexmiller 2021-05-16T03:16:18.148900Z

my initial thought would be to allow string lib names that canonicalize to a symbol

1➕
alexmiller 2021-05-16T03:16:50.149100Z

or support some escape character that's ignored

borkdude 2021-05-16T09:22:34.149300Z

I vote for the string lib name

1👍3➕