This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-16
Channels
- # announcements (16)
- # asami (5)
- # aws (2)
- # babashka (4)
- # beginners (22)
- # calva (28)
- # cider (3)
- # clj-kondo (1)
- # cljdoc (13)
- # cljs-dev (16)
- # clojure (3)
- # clojure-australia (1)
- # clojure-europe (25)
- # clojure-gamedev (1)
- # clojure-germany (2)
- # fulcro (34)
- # helix (4)
- # jobs-discuss (16)
- # leiningen (10)
- # malli (20)
- # meander (7)
- # nrepl (35)
- # off-topic (1)
- # portal (13)
- # ring-swagger (3)
- # shadow-cljs (34)
- # tools-deps (7)
- # vim (1)
Hello, I'm having issues making my plugin (`lein-clojure-lsp`) set a JVM opt, does anyone knows how to properly configure it? 🧵
I want to make my plugin set "--add-opens" "java.base/java.nio=ALL-UNNAMED"
, I already tried adding :jvm-opts ["--add-opens" "java.base/java.nio=ALL-UNNAMED"]
to the plugin project.clj
also, I tried adding that jvm opts to the project that is using the plugin as well and it didn't work
the only way I got that to work is via the env var:
LEIN_JVM_OPTS="--add-opens=java.base/java.nio=ALL-UNNAMED" lein clojure-lsp clean-ns --dry
but that's not what I want since I want to add that jvm flag for all users of lein-clojure-lsp
to avoid warnings like:
WARNING: Illegal reflective access by org.lmdbjava.ByteBufferProxy$AbstractByteBufferProxy (file:/home/greg/.m2/repository/com/github/clojure-lsp/clojure-lsp/2021.09.30-15.28.01/clojure-lsp-
2021.09.30-15.28.01.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.lmdbjava.ByteBufferProxy$AbstractByteBufferProxy
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Yes, instead of doing it in project.clj, do it in the plugin ns its 'main' function receives a project map as data representing the end user's project, you can add the jvm opt there
Oh, nice, I will try that, thank you @U45T93RA6!