This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-04
Channels
- # announcements (1)
- # architecture (7)
- # beginners (44)
- # biff (11)
- # calva (15)
- # cider (5)
- # clerk (9)
- # clj-kondo (20)
- # clj-on-windows (19)
- # clj-yaml (2)
- # cljs-dev (39)
- # clojure (52)
- # clojure-czech (2)
- # clojure-dev (11)
- # clojure-europe (28)
- # clojure-hamburg (10)
- # clojure-hungary (3)
- # clojure-nl (1)
- # clojure-norway (59)
- # clojure-uk (5)
- # clojured (2)
- # clojurescript (33)
- # conjure (2)
- # datahike (1)
- # datomic (5)
- # defnpodcast (5)
- # emacs (18)
- # figwheel (2)
- # funcool (6)
- # graphql (1)
- # hyperfiddle (11)
- # jobs (3)
- # joyride (13)
- # malli (6)
- # music (4)
- # off-topic (45)
- # polylith (11)
- # practicalli (3)
- # rdf (3)
- # releases (1)
- # scittle (8)
- # shadow-cljs (13)
- # specter (2)
- # squint (8)
- # testing (6)
- # tools-deps (21)
- # xtdb (2)
Not sure the best place to ask this, but using the new add-libs
on windows I seem to keep getting the dreaded CreateProcess error=206, The filename or extension is too long
error. It happens even when adding the same deps to my deps.edn file and restarting my repl works fine. Is anyone else hitting this? Is there a way to debug the CLI command being ran?
@U064UGEUQ I've done an experiment here by re-binding the invoke-tool var (which is an intentional use of that): https://github.com/borkdude/lein.repl.deps
This code is not coupled to lein at all, but it would enable you to use add-libs in leiningen without installing the CLI. Playing around with that code might give you some ideas
It might still have the same issue as you encountered though. The issue is that Windows has a certain limit on the argument length and if your classpath gets really long that's a problem. There is an ask issue for this though. It could be solved easily on Java 9+
Cool I'll try playing with that at some point. You mean this ask question right? https://ask.clojure.org/index.php/7864/windows-version-tools-deps-fails-launch-java-classpath-long So the idea would be to rebind invoke tool to use a "pathing jar" as described there to keep the command short
I think I could fix this in deps.clj but I don't want to get too far ahead of the official CLI
The change would be here:
https://github.com/borkdude/deps.clj/blob/2f93fe8ba712c855feb6ecf26d2ed70646b34356/src/borkdude/deps.clj#L872
The solution would be to first write the classpath to a temp-file and then use --classpath @file
Oh yeah thanks. I've definitely hit this before prior to the new add-libs things but usually it works for me to just set my mvn/local-repo to /r
.
I wasn't sure of the nature of it yet relating to add-libs though, curious if there might be a way to get the command string length more in line with the normal clj
one. I've just been hitting this with one medium sized project though.
The --classpath option seems pretty straightforward to get working for a custom invoke tool though
The issue with fixing this is compatibility with java 8. So you'd have to probe java --version
or just try it and if it fails go back to the old behavior, or do it through an explicit setting or env var or so: DEPS_CLJ_USE_CP_FILE_ARGUMENT=true
I actually think the issue in add-lib might not be just that but the large arguments we pass, so not sure just the classpath thing is enough
asked here: https://ask.clojure.org/index.php/12916/libs-clojure-alphas-causing-filename-extension-long-windows
well, not the whole basis, but significant portion
it's in my queue, will definitely be working on this for next alpha
I've released a new deps.clj which at least solves one "too long file argument" problem when passing a long classpath.
Try scoop install clj-deps
from the scoop-clojure by @UBLU3FQRZ