This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-23
Channels
- # announcements (7)
- # babashka (40)
- # babashka-sci-dev (74)
- # beginners (74)
- # calva (31)
- # cider (11)
- # clj-kondo (22)
- # cljs-dev (1)
- # cljsrn (1)
- # clojure (70)
- # clojure-brasil (3)
- # clojure-dev (12)
- # clojure-europe (39)
- # clojure-nl (2)
- # clojure-norway (15)
- # clojure-uk (9)
- # clojurescript (69)
- # community-development (2)
- # conjure (1)
- # core-async (3)
- # cursive (1)
- # data-science (1)
- # datalevin (13)
- # datomic (17)
- # emacs (42)
- # events (1)
- # fulcro (16)
- # graphql (9)
- # helix (1)
- # holy-lambda (14)
- # honeysql (2)
- # hugsql (3)
- # hyperfiddle (5)
- # kaocha (10)
- # lsp (41)
- # luminus (5)
- # malli (7)
- # meander (3)
- # membrane (47)
- # off-topic (23)
- # podcasts (2)
- # polylith (34)
- # rdf (4)
- # re-frame (2)
- # releases (2)
- # remote-jobs (1)
- # ring (16)
- # shadow-cljs (111)
- # spacemacs (6)
- # test-check (2)
- # tools-deps (19)
what's the right way of writing the jvm option in a deps.edn
file?
{:jvm-opts ["-Dsnoop.enabled"]
:deps {}}
I can write -J-Dsnoop.enabled=true
on the command line, and I would like the deps.edn
equivalentyou can provide them in an alias with :jvm-opts
as you have above and then use the alias
{:aliases {:snoop {:jvm-opts ["-Dsnoop.enabled"]}}}
clj -A:snoop
most jvm options don't make sense for the open world of all possible programs you might run in a project
so I'm not terribly convinced yet that this is a good feature to have :)
I've just added some pages on JVM options, showing how to use them with Clojure CLI. https://practical.li/clojure/reference/clojure-cli/jvm-options.html There are also a number of examples and https://practical.li/clojure/reference/jvm/java-17-flags.html. There are a lot of options to choose from ๐ It would be very interesting to know which options are commonly used. I've put together https://practical.li/clojure/reference/jvm/common-options.html. Appreciate any corrections if something is not quite right.
I would definitely add the OmitStackTrace one
That is the most common jvm option I use
And probably next most common are the โillegal-access flags - debug and deny
Interesting. It seems the --illegal-access flag was marked deprecated in Java 16, with https://openjdk.java.net/jeps/403. So maybe one day it will be less common :)
Well I missed that!
That's actually great, I'm glad they switched the default to deny as that means the reflection canAccess methods will actually work
The Clojure reflector uses that feedback to look further up the inheritance chain for a public method to call