We're seeing a security exception when launchpad reloads stuff. It's not entirely consistent, but happens relatively frequently. Sometimes the reload was still successful, other times nothing has changed. Has anyone else experienced this? See stack trace in ๐งต
yes, I have seen that before, but thanks for raising this, because it made me realize there's an easy fix. lambdaisland.classpath loops over all threads to set the contextclassloader. We should just skip InnocuousThread instances. I'm not sure when these types of threads are used, and if you would try to load clojure code from such a thread it would not pick up the new classpath, but there's not much we can do about that.
Aha, it's a specific kind of thread
Sounds like a good plan
could you test with lambdaisland/classpath "5a891483200a6cbf856db4ff827f44b33353cbd1"?
com.lambdaisland/classpath
{:git/url ""
:git/sha "5a891483200a6cbf856db4ff827f44b33353cbd1"}
Seems to work ๐ Although I don't really know how to reproduce the stack trace. I booted the process with the new classpath dependency, and tried to dynamically add a dep to deps.edn, and it reloaded without error.
I'll keep using it and let you know if I run into issues. Thanks ๐
I'll try to cut a release and upgrade launchpad. Probably next week.
[watch-deps] โจ Reloading deps.edn โจ
Error in lambdaisland.classpath/install-priority-loader! #error {
:cause setContextClassLoader
:via
[{:type java.lang.SecurityException
:message setContextClassLoader
:at [jdk.internal.misc.InnocuousThread setContextClassLoader InnocuousThread.java 168]}]
:trace
[[jdk.internal.misc.InnocuousThread setContextClassLoader InnocuousThread.java 168]
[lambdaisland.classpath$install_priority_loader_BANG_$fn__51854 invoke classpath.clj 399]
[clojure.core$binding_conveyor_fn$fn__5842 invoke core.clj 2047]
[clojure.lang.AFn call AFn.java 18]
[java.util.concurrent.FutureTask run FutureTask.java 317]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1144]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 642]
[java.lang.Thread run Thread.java 1570]]}
[watch-deps] + node_modules/@mattilsynet/design
Error in lambdaisland.classpath/install-priority-loader! #error {
:cause setContextClassLoader
:via
[{:type java.lang.SecurityException
:message setContextClassLoader
:at [jdk.internal.misc.InnocuousThread setContextClassLoader InnocuousThread.java 168]}]
:trace
[[jdk.internal.misc.InnocuousThread setContextClassLoader InnocuousThread.java 168]
[lambdaisland.classpath$install_priority_loader_BANG_$fn__51854 invoke classpath.clj 399]
[clojure.core$binding_conveyor_fn$fn__5842 invoke core.clj 2047]
[clojure.lang.AFn call AFn.java 18]
[java.util.concurrent.FutureTask run FutureTask.java 317]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1144]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 642]
[java.lang.Thread run Thread.java 1570]]}