clj-on-windows

2024-05-30T20:24:19.822719Z

Hi, I have a frustrating experience trying to create a new pedestal 0.7 project with the deps-new template on windows. http://pedestal.io/pedestal/0.7/guides/embedded-template.html Settings are done properly according to the documentation but when I execute ( clojure -A:1.12 -Tnew create :template io.github.pedestal/pedestal%embedded%io.pedestal/embedded :name com.blueant/peripheral ) I get this result Resolving io.github.pedestal/pedestal as a git dependency Execution error (IOException) at java.lang.ProcessImpl/create (ProcessImpl.java:-2). CreateProcess error=2, The system cannot find the file specified Could somebody please help me out a little ?

👀 1
Alex Miller (Clojure team) 2024-05-30T20:38:47.457749Z

I don't know the answer but usually that's the error you get when your shell can't find the program you're trying to execute. Some things to check: clojure, java , and git - do those all run at your shell?

borkdude 2024-05-30T20:51:07.933469Z

It could be an issue with %embedded% since that is the Windows cmd.exe notation for a shell variable

👍 1
borkdude 2024-05-30T20:53:11.411099Z

You might have luck with writing double percent signs instead: %%embedded%%

2024-05-30T20:54:38.195299Z

@alexmiller, yes, they do.

borkdude 2024-05-30T20:56:34.203599Z

If you happen to have bb installed, you could drop into a bb REPL and then execute, to bypass shell issues:

(babashka.deps/clojure "-A:1.12" "-Tnew" "create" ":template" "io.github.pedestal/pedestal%embedded%io.pedestal/embedded" ":name" "com.blueant/peripheral")

2024-05-30T20:56:38.465459Z

%%embedded%% didn't work

borkdude 2024-05-30T20:56:59.554579Z

(I copied those args from the README you linked to)

👍 1
2024-05-30T20:58:16.197669Z

I will try it with bb

2024-05-30T21:05:35.290819Z

well, urm I think I need to dig deeper tomorrow. The error message I've seeen with bb convinced me to try it again in the morning time.

2024-05-30T21:09:53.372999Z

I will give it another try tmrw. then . Thanks for your fast help!

borkdude 2024-05-30T21:11:26.911499Z

something seems to shell out to clojure but this doesn't work if you have installed the CLI as a Powershell thing

borkdude 2024-05-30T21:11:42.643569Z

Try this: https://github.com/casselc/clj-msi

👍 1
2024-05-30T21:12:00.968269Z

I will try that tmrw then, thanks again!

seancorfield 2024-05-30T21:29:27.237139Z

Yes, deps-new relies on add-lib in Clojure 1.12, which runs a subprocess for clojure to do the resolution and fetching of the dependency.