This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-13
Channels
- # aleph (3)
- # announcements (2)
- # aws (48)
- # babashka (93)
- # beginners (101)
- # bristol-clojurians (1)
- # cider (3)
- # clj-kondo (17)
- # cljdoc (1)
- # cljsrn (3)
- # clojure (208)
- # clojure-dev (2)
- # clojure-europe (19)
- # clojure-italy (18)
- # clojure-losangeles (16)
- # clojure-nl (8)
- # clojure-spec (21)
- # clojure-sweden (8)
- # clojure-uk (57)
- # clojuredesign-podcast (6)
- # clojurescript (10)
- # code-reviews (6)
- # core-typed (1)
- # cryogen (7)
- # cursive (38)
- # datomic (34)
- # duct (13)
- # emacs (13)
- # fulcro (16)
- # funcool (2)
- # graalvm (1)
- # lambdaisland (5)
- # luminus (8)
- # lumo (1)
- # malli (2)
- # off-topic (12)
- # pathom (9)
- # re-frame (13)
- # reagent (11)
- # ring (3)
- # shadow-cljs (15)
- # sql (19)
- # tools-deps (61)
- # xtdb (23)
Does seancorfield/clj-new
have a way to specify copying a binary file from the template source dir to the target dir? The doc kind of says that the render
function without a data
argument would do that, but it looks like it treats the file as text with linefeeds and corrupts the binary data. Is there a way to do this that still fits into the ->files
body?
@rberger That sounds like a nice enhancement! Feel free to open a GitHub issue. Do you know if either lein-new
or boot-new
support such a thing? (`boot-new` was originally based on lein-new
and clj-new
was forked from boot-new
but I haven't tracked their progress much since).
I haven't used the others {lein,boot}-new
I'll open a github issue. I guess in the short term I could create another renderer for binary files that would do the copy
Feel free to provide a PR with that enhancement too.
@rberger Just looked in the code and there's a raw-resourcer
which I suspect can be used to copy binary files. I can't say I remember trying that but it's worth a shot.
https://github.com/search?q=raw-resourcer&type=Code -- looks like quite a few Leiningen templates use that so that should point you in the right direction
Looks like the raw-resourcer
does the trick! No need for any changes in clj-new. Just a couple of lines in my template code (https://github.com/omnyway-labs/chromex-shadow-template)
By the way for some reason https://cljdoc.org/d/seancorfield/clj-new is having problems building the docs for the most recent couple of releases of clj-new.
Thanks for the heads up. Weird error Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.7.5
Hmm, it's leftover in the pom.xml
by accident š
I've pushed 0.9.0 with that fix but the doc system build process is broken right now (by changes to Clojars CDN setup). Once that's fixed, I'll rebuild the clj-new docs.
Hello I try to run clj on windows in cygwin but I get:
$ clojure Error: Could not find or load main class clojure.main Caused by: java.lang.ClassNotFoundException: clojure.main
Any ideas?
try clojure -Spath
you should get a string with all the jars including clojure-%version%.jar
then go check if this jar is actualy available
If I run "clojure -Spath" I get the same error
@andreas.scheinert We had someone here a while ago who has an older version of clojure
on his path. What do you see when you type clojure -h
I have a file here: /usr/local/lib/clojure/libexec ==> clojure-tools-1.10.1.507.jar*
borkdude here is version "clojure -h" print out
Version: 1.10.1.507
I know its a bit side stepping but, ok I took the effort and installed it on powershell
clj and clojure give me now a REPL
how do I run the deps code from here in powershell? https://github.com/clj-python/clj-template
clj -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "0.8.6"}}}' \
-m clj-new.create \
\
appcompany.funapp
I figured I remove all the \ and create a long single line of command, but then that still gives me:
Error while parsing option "--config-data {:deps {seancorfield/clj-new {:mvn/version 0.8.6}}}": java.lang.NumberFormatException: Invalid number: 0.8.6
@rberger That sounds like a nice enhancement! Feel free to open a GitHub issue. Do you know if either lein-new
or boot-new
support such a thing? (`boot-new` was originally based on lein-new
and clj-new
was forked from boot-new
but I haven't tracked their progress much since).
I notice that resolve-deps doesn't mention that it will be concurrent even if :threads isn't provided. Should it?
Ah, follow this guide for Windows https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows#escaping-quotes
Even following that Windows guide didn't work for me š
make-classpath-roots mentions the system separator, but it doesn't really make sense in the context.
@andreas.scheinert This worked for me:
> clj -Sdeps '{:deps {seancorfield/clj-new {:mvn/version ""0.8.6""}}}' -m clj-new.create appcompany.funapp
So, double ""
inside '
(that said, even with Python 3.7 installed from the Windows Store, I can't actually get the new project to run but that should be taken up in #libpython-clj at this point)
Thank you sean for replying! Yes the quoting did the trick but I am stuck kat the same point as you I couldn't get windows python to work with libpython-clj
For private git repo deps on Windows, is only Pageant supported as the ssh agent for authentication or can OpenSSH also work?
try it and see?
I know that pageant works, don't know about openssh
@alexmiller I have been trying. It seems to be attempting to use OpenSSH. I can tell because the specific error message I get changes depending on whether github is added to .ssh/known_hosts
. However, even though I can use git
on Powershell to clone a private git repo, I get an error when trying to run clj with a private github dep. The lowest part of the stack trace is just:
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:126)
... 45 more
which doesnāt give me a ton to go on. Itās been really painful to debug.well I think I would say, no it doesn't work then
Itās been finicky to get it working even with Pageant. So Iām never sure whether something just doesnāt work, or if Iām just doing something slightly wrong
ssh is generally tricky, particularly with access to the wide world of credential providers
there are some options (including shelling out to just use git) which we have explored. newer versions of jgit use apache mina instead of jsch. I have spent some time working on evaluating these alternatives but haven't had time to really get to the end of that process
another option would be to clone, then use as a local repo instead
or to clone, build and install a local artifact, then use that
Okay, thanks. One other question for you. Iāve resorted to trying OpenSSH on one of our devās windows machines only because we couldnāt get deps working with Pageant on that machine. I have no idea why itās not working because weāve been able to get it working on other Windows machines. Based on your experience, do you have any idea of any āgotchasā we might be running into? The error message is the same as above.
If not, thatās okay, I know thatās a very vague question. Just wondering if anything comes to mind of the top of your head
I don't unfortunately. the jsch stuff is a bit flaky
Okay, well thanks anyway. Btw, just wanted to say I was at StrangeLoop in September and really enjoyed it. Thanks for doing that.
great! thx
if you're using any ssh agent, make sure the SSH_AUTH_SOCK variable is set so that Clojure (via JSch) knows where the agent is
Are you sure this is applicable for Windows? I canāt find much information about it in the context of Windows, and Clojure seems to work fine on my windows machine using Pageant as the ssh-agent without this env variable being set.
that's what jsch does, too.... sorry Windows just adds a lot of extra wildcards because of all the various linux-y environments
paging @U04V70XH6
I know nothing about ssh on windows, sorry
I only ever use ssh stuff via Ubuntu / WSL on windows š