can I add :jvm-opts
without adding it in an alias?
I don't think that works
I donโt know the internals of tools-deps. Does that make sense? Coming from leiningen it seems like a strange omission.
-J
You can add jvm opts at the point of invocation with clj -J...
, but not in deps.edn file
@peder.refsnes You can vote for it here: https://ask.clojure.org/index.php/7834/support-default-jvm-opts
I continue to feel this is weirdly at odds with using tools
and I'm going to continue not implementing it until that makes sense :)
Yeah, I don't see much of a use case for it either. I have only ever needed to set JVM options for a specific task, which means a specific alias.
But people do keep asking for it, so hopefully someone will come up with a justification for it that is convincing... ๐
(and "leiningen supports it" isn't at all convincing to me ๐ leiningen does a lot of things that I don't think are necessarily good ideas)
I do actually get the use case, it's just that's not the only use case
What sort of JVM options can you imagine folks wanting to set for all operations in a deps.edn
project? I'm curious...
well the use case is where "all" is the two things you usually do
and you "always" want to do something like set a system property for your app or a particular garbage collector or whatever
I think in some cases "all" is really "when I run my repl I want default stuff to be set"
that is in particular an interesting case where having a "default" alias might be useful
not too different than leiningen :default profile really
My current (and only) reason for wanting this is for playing around with Dragan Djurics ML libraries. Seems it needs a workaround for java 9+. https://github.com/uncomplicate/neanderthal/blob/master/examples/hello-world/project.clj#L11-L12
Which you could put in an alias, you just need to remember to use it then
Indeed, but itโs annoying when you forget ๐ Iโm all for features carrying their weight, just thought Iโd ask.
I think I would have a :run
alias for running the app so it's just clojure -M:run
and perhaps a :dev
alias for running a REPL and just live with the duplication of :jvm-opts
...
I find lein's default profiles confusing, it's always hard to tell what's enabled/on the classpath
Indeed. Leiningen's "helpfulness" is one of the things I always liked the least about it.
couldnโt you use that same reasoning to argue against having a default`:deps` key?
Although some folks think this is a bit much clj -M:repl:reflect:jedi-time:reveal:j14:classes:add-libs:dev+test
๐
@peder.refsnes having a base set of dependencies that almost every use case builds on is very useful tho'... same with a base set of :paths
...
I just have a :dev
alias and have my editor always start a repl with that alias. It's pretty easy in emacs on both cider and inf-clojure. Do other editors offer something like this?
I always start my REPL separately (and leave it running for ages -- my current REPL was started on December 24th!) and then connect one or more editors or other tools to it.
@seancorfield of course, just being pedantic ๐
That's impressive! I can't seem to go a day without some catastrophic crash that I brought on myself
how do you ensure your code is live when e.g. switching between branches?
@vlaaad We rarely have long-lived branches and for the most part the code changes across multiple branches are accretive, rather than contradictory. I almost never need to require ... :reload-all
(but I do have it bound to a hot key in VS Code). I occasionally need to remove a namespace (and then load it back in), if I'm changing aliases around (and, again, I have remove-ns
bound to a hot key as well).
(and I tend to develop against multiple server processes all running from inside the REPL -- we have an "everything" subproject in our monorepo that has :local/root
dependencies on all the other subprojects so we can start a REPL there and have all source/test code and all dependencies available in a single REPL)