mfikes / ambly

ClojureScript REPL into embedded JavaScriptCore
http://ambly.fikesfarm.com
Eclipse Public License 1.0
541 stars 21 forks source link

(require 'my.namespace :reload) fails to actually reload #15

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

With #7 I inadvertently added an overly-aggressive load guard causing a given file to only be loaded at most once.

In particular, when

(require 'my.namespace :reload)

is issued, the following JavaScript is evaluated:

goog.require('my.namespace', true);

and the guard needs to be relaxed in the case that the true parameter is passed.

mfikes commented 9 years ago

Empirically I can see that (require 'my.namespace) only causes the require hook to be called the first time, and subsequent times it is a NO-OP. But adding :reload causes require to again be invoked. Presumably this is being part of the recent new REPL support.

The guard added for #7 is presumably not needed then, so I'll remove it.