Can the change
command add a non-existing key?
I wonder if leiningen should be installed in a production server and if it's ok then to run lein repl
on the server? Thoughts anyone?
asking this because it would be nice if you could reproduce issues you are having in production by running code in the same environment it's deployed in (on the same box) while trying to debug....
just like you can do in a django shell or something similar
I noticed in the leiningen documentation that they recommend that you don't use leiningen in production and use an uberjar instead... but still...
You can also embed nrepl in your app
you should start a NRepl in your production on a secured port (not forwarded publicly)
and then connect to it locally
with lein repl :connect ...
Hi, I have a wierd error with lein update-in.
This does not work:
lein update-in : assoc :local-repo "/workspace/lein-repo" -- test
This works
lein update-in : assoc :local-repo "123" -- test
not sure why "/workspace/lein-repo" would not work
@jarvinenemil what is not working. And the second command doesn’t do anything really on its own . So what “works” about it ?
im expecing the config map to be updated but 1 throws exception
getting error in the lisp interpreter when using the workspace-string
What sort of exception
1 sec...
I think a lot of developers prefer to create and deploy JAR files to their production environment, rather than run Leiningen there. For one, running Leiningen in production deployment machines opens you up to the possibility of resolving dependencies differently, and/or failing to retrieve those dependencies over the network.
why is there a space between :
and assoc
?
I use :
so I am at the top-level
since there is only update-in
@jarvinenemil maybe just a bash escaping issue
Put single quotes around your path string
Perhaps it’s being interpolated.
Although weird to me
I'll investigate using nrepl...
Oh. Also. https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L144
:local-repo is assumed relative path
Relative to the project root.
So you’d path may just not be a supported type here.
ah, I am trying to get my ci/cd pipeline to cache dependencies
when using leiningen, so I figured that :local-repo was the way to go
Yeah. I’ve done similar before
But I had some other workarounds I think
You maybe could try some sort of symlink
I never tried that before
I have a maven pipeline that works so I figured it should play almost the same 😉
There are also socket REPLs that can be enabled, built into Clojure with no extra dependency, if you prefer, which can be used during development and in production (as can nrepl, if you wish). The choice between those is, I believe, primarily driven by whether the dev environment that you want to connect to the JVM process is using nrepl
Is anyone building clojure code in docker containers?
I am running the official clojure:lein image and it does not recognize with-profile commands etc.
test
and uberjar
works fine
If you are, please tell me which image ur using
@jarvinenemil so you're saying lein with-profile +foo ...
isn't working? what did you try and what's the symptom?
I tried to execute that command inside the docker-container and it says 'with-profile +ci-cd test' is not a task. See 'lein help'.
I am using clojure:openjdk-11-lein
from DockerHub
it looks to me like it wanted "with-profile" "+ci-cd" "test"
in the Dockerfile, and got "with-profile +ci-cd test"
instead
(ins)justin@abjection:~/clojure-experiments$ lein with-profile +foo repl
Warning: profile :foo not found.
Warning: profile :foo not found.
nREPL server started on port 46677 on host 127.0.0.1 - <nrepl://127.0.0.1:46677>
REPL-y 0.4.4, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.7+10-post-Ubuntu-2ubuntu219.10
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> Bye for now!
(ins)justin@abjection:~/clojure-experiments$ lein 'with-profile +foo repl'
'with-profile +foo repl' is not a task. See 'lein help'.
im gonna try to split it up thanks
because when I only have one command, such as "test" it works just fine
right, that's what I'd expect from shell quoting
thanks @noisesmith I just verified that this solved my issue. I am very grateful that you took the time to help me out 🙂.