This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-13
Channels
- # babashka (45)
- # babashka-sci-dev (15)
- # beginners (72)
- # biff (4)
- # calva (3)
- # clj-on-windows (67)
- # clj-otel (1)
- # cljfx (7)
- # clojure (74)
- # clojure-austin (1)
- # clojure-dev (4)
- # clojure-europe (6)
- # clojure-gamedev (1)
- # clojure-germany (5)
- # clojure-losangeles (6)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojured (2)
- # clojurescript (42)
- # core-typed (2)
- # cursive (4)
- # emacs (18)
- # events (1)
- # fulcro (13)
- # humbleui (8)
- # introduce-yourself (2)
- # kaocha (11)
- # leiningen (5)
- # lsp (16)
- # malli (8)
- # off-topic (69)
- # pathom (38)
- # pedestal (3)
- # reagent (17)
- # releases (3)
- # shadow-cljs (10)
- # spacemacs (6)
- # sql (1)
- # tools-deps (5)
- # xtdb (20)
I added an answer https://ask.clojure.org/index.php/11767/how-can-we-make-it-easier-for-beginners-to-install-clojure?show=11773#a11773 I hope you find it helpful
yes i know it however it's not mentioned at all on the getting started guide for windows usesr
so how a new user is supposed to know about it ?
also, there's no mention about how to create a new project there!
i had to ask here to learn about f.e https://github.com/seancorfield/deps-new
i can't take that decision myself
if it's not there maybe there are reasons for not being there
I don't think anything will change on the windows side unless people will pro-actively report issues and submit PRs
yes you are right i guess ... where could I report an issue with these docs ?
@U03BMTULBSL https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows is a wiki page on GitHub that anyone can edit I think?
(I have "Contrib" permission as a maintainer so I don't know if that wiki is restricted)
Seems that I can edit it. I'll try to add some tips for new users from my experience
Hey @U04V15CAJ @U04V70XH6 I've installed deps.exe (deps.clj - https://github.com/borkdude/deps.clj ) on my windows system and it seems to be working (i get a clojure rpl when I run deps). now I want to install deps.new (https://github.com/seancorfield/deps-new) to be able to create a new project.
I tried this command for starters (to avoid the quoting problems): deps -Ttools install io.github.seancorfield/deps-new :as new
and got: Key is missing value: new
I also tried various other combinations i.e deps -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.9"}' :as new
or deps -Ttools install io.github.seancorfield/deps-new '{:git/tag """v0.4.9"""}' :as new
but always got the same error (Key is missing value: new
when I run -Ttools install without parameters I get:
deps -Ttools install
Execution error (ExceptionInfo) at clojure.tools.tools.api/install (api.clj:37).
Missing required args, syntax: clj -Ttools lib-name coord :as tool-name
any help would be welcome, thank you !
yes of course
i only use cmd.exe i hate powershell
afaik cmd.exe doesn't support single quote for delimiting strings on the command line
ok but shouldn't this thingie deps -Ttools install io.github.seancorfield/deps-new :as new
work ?
I think so. I'm not near a Windows machine today (travelling) but I can try tomorrow
thank you
can you explain me what "coord" is ? from this message: Missing required args, syntax: clj -Ttools lib-name coord :as tool-name
is there a way to pass a coord in cmd.exe ?
hey i made it work !
here's the command: deps -Ttools install io.github.seancorfield/deps-new "{:git/tag """v0.4.9"""}" :as new
yey deps -Tnew app :name spapas/newapp
succeeds!
now if i visit my newapp folder and run deps.exe i'll get a repl on my app ?
I wish there was a way to omit those quotes on the command line. It would cause less confusion between OSSes. This issue is about that. If you agree, please upvote it: https://ask.clojure.org/index.php/11585/consider-convention-for-bypassing-edn-parsing-in-x-usage /cc @U064X3EF3
Although in this case you would likely still need quotes since the coordinate map should be handled as one whole thing.
There is also a wiki where you can add helpful info about working on Windows: https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows
Yes I'll try; but will my changes be reviewed by somebody? I don't know what's the policy for writing stuff
I could write a small article on my blog instead (https://www.spapas.net/) ?
cool I'll do that to be sure that I express my opinions 🙂 thanks
Ok I've created a new project using the https://github.com/seancorfield/deps-new/ however when I try to run anything using deps -X
I get: No function found on command line or in :exec-fn
here's the deps.edn I have:
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}}
:aliases
{:run-m {:main-opts ["-m" "depsapp.core"]}
:run-x {:ns-default depsapp.core
:exec-fn greet
:exec-args {:name "Clojure"}}
:build {:deps {io.github.seancorfield/build-clj
{:git/tag "v0.6.3" :git/sha "9b8e09b"
;; since we're building an app uberjar, we do not
;; need deps-deploy for deployment:
:deps/root "slim"}}
:ns-default build}
:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "48c3c67"}}}}}
now I'm running f.e deps -X:run-m`` and get
No function found on command line or in :exec-fn``
any idea ?
yes you are right thank you
i'm running deps.exe and getting a repl in the user namespace. is there a way to define the namespace before starting ?
@U03BMTULBSL You can do -i init.clj
with some initialization code
@U04V15CAJ thank you!
i've written a post: https://www.spapas.net/2022/04/14/clojure-windows/ if you wanna take a look
i've posted it on #beginners, shall i post it anywhere else ?
thank you
One piece of feedback: > To be able to create a new project you’ll need to use the https://github.com/seancorfield/deps-new project. I hardly use any such tool, I create my projects usually from scratch. I've also written a small #babashka script to add stuff to existing projects, like dependencies: https://github.com/babashka/neil
you mean you create your project by creating the required folders and deps.edn by hand ?
clj-new / deps-new are convenient but manually it's not too hard to setup a project either
yes you are right i'll rephrase that a bit
it's just that for a newbie it's easier (and faster) to create the project skeleton through a tool instead of by hand