tools.nrepl

Too many DynamicClassLoaders created

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 0.2.0-RC1, 0.2.0-beta9, 0.2.0-beta10
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Not sure whether this ticket belongs here or in the Clojure-proper JIRA, so feel free to close if this is an inappropriate location. clojure.main/repl creates a new DynamicClassLoader on every execution, so it looks like the stack of classloaders grows without bounds. Seems a bit similar to http://dev.clojure.org/jira/browse/NREPL-31 in that clojure.main/repl has another assumption about when clojure.main/repl will run.

See https://groups.google.com/forum/?fromgroups=#!topic/clojure/firG9zTVecU%5B1-25%5D for the original report.

Activity

Chas Emerick made changes -
Field Original Value New Value
Priority Minor [ 4 ] Critical [ 2 ]
Affects Version/s 0.2.0-RC1 [ 10154 ]
Affects Version/s 0.2.0-beta9 [ 10151 ]
Affects Version/s 0.2.0-beta10 [ 10153 ]
Chas Emerick made changes -
Fix Version/s NEXT [ 10160 ]
Hide
Chas Emerick added a comment -

Yes, this should be fixed upstream; a new DynamicClassLoader should only be set as the thread-context classloader if one is not already in place.

My first impulse upon seeing this was that this was "last straw" territory w.r.t. using clojure.main/repl (as recorded in the thread linked above), but the work necessary to stop depending upon it would be considerable (not because repl does much, but because interruptible-eval/evaluate is structured to cater to it). Some years on, and it's clear that this fundamentally a minor problem (insofar as hardly anyone has complained AFAIK), so a fix that requires e.g. Clojure 1.7.0 would be fine.

Show
Chas Emerick added a comment - Yes, this should be fixed upstream; a new DynamicClassLoader should only be set as the thread-context classloader if one is not already in place. My first impulse upon seeing this was that this was "last straw" territory w.r.t. using clojure.main/repl (as recorded in the thread linked above), but the work necessary to stop depending upon it would be considerable (not because repl does much, but because interruptible-eval/evaluate is structured to cater to it). Some years on, and it's clear that this fundamentally a minor problem (insofar as hardly anyone has complained AFAIK), so a fix that requires e.g. Clojure 1.7.0 would be fine.
Chas Emerick made changes -
Priority Critical [ 2 ] Minor [ 4 ]
Fix Version/s 0.2.4 [ 10160 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: