This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-06
Channels
- # announcements (3)
- # aws (23)
- # beginners (61)
- # calva (57)
- # cider (121)
- # clara (1)
- # clj-kondo (9)
- # cljs-dev (62)
- # cljsrn (3)
- # clojure (79)
- # clojure-europe (2)
- # clojure-nl (19)
- # clojure-spec (9)
- # clojure-uk (14)
- # clojurescript (92)
- # clojureverse-ops (2)
- # cursive (3)
- # data-science (2)
- # duct (1)
- # figwheel (2)
- # graphql (6)
- # jobs (1)
- # kaocha (5)
- # leiningen (11)
- # off-topic (25)
- # overtone (1)
- # pedestal (4)
- # portkey (1)
- # re-frame (1)
- # remote-jobs (2)
- # shadow-cljs (179)
- # slack-help (3)
- # specter (7)
- # testing (14)
- # tools-deps (14)
- # unrepl (12)
- # vim (2)
- # yada (3)
I want use -Jopt
to add a jar file into classpath. what is the correct syntax looks like? clojure -J-cpjarpath ...
seems to be no effect and clojure -J-cp jarpath ...
will cause an error.
@doglooksgood use -Sdeps
clj builds the classpath so you must use your deps.edn for any modifications to the classpath. in this case, you'll want to use a local jar lib dependency - like my/lib {:local/root "/path/to.jar"}
if you just want to add it sometimes, either put it in an alias with :extra-deps
or declare it dynamically on the command line with -Sdeps
Getting this error running clojure
L com.jcraft.jsch.agentproxy.AgentProxyException: connector is not available
. This is on WSL running under Windows 10. Seem to recall having this issue before, but I don't remember the fix. git
commands work fine, I recall this being something specific with the Java ssh implementation.
@seancorfield This was encountered while attempting to build an uberjar with depstar. Tried on Windows instead of WSL, where I get Exception in thread "main" java.nio.file.NoSuchFileException: C:\Users\dave\AppData\Local\Temp\uberjar8947452084826452117\uncomplicate\neanderthal\aux.clj
, which seems weird, like there was a file in the manifest that didn't get copied.
@dave.dixon If you can repro easily, feel free to create an issue on GitHub with details and I'll take a look -- but I suspect something AOT-related
@dave.dixon Thanks for the repro case. It's definitely a weird one. Files/copy
is failing on the target file during the copy which suggests the parent folder is missing (it isn't) or there is a permissions problem (there isn't). I've tried various changes to depstar
locally but cannot figure out what the issue is.
Tracing through the JDK source, it seems to hinge on the last Windows filesystem error triggering an exception so I thought maybe it was a sync'ing issue -- but using SYNC or DSYNC for StandardOpenOption
made no difference either.
I cloned and ran with :local/root
and it works. :thinking_face:
Wait - never mind, I was commenting out the neanderthal dependency 😬 Been that kind of day.
@seancorfield If I exclude that file explicitly, it "works", in the sense of not throwing that exception. So it seems to be that single aux.clj
file that's an issue.
Weird.
And it gets weirder. So I modified depstar
so that if a copy operation fails, it tries again, just copying the file to the top of the tree in the temp folders (so uncomplicate/neanderthal/aux.clj
copies to thing.clj
) and then it "succeeds" and copies the files that follow aux.clj
in the Neanderthal JAR. However, I got a weird NoSuchFile exception trying to write test.jar
after that (where it shouldn't matter if the file exists or not). I ran touch test.jar
and re-ran the command -- and it worked just fine (with aux.clj
copied to the top of the tree).