{"action":"created","issue":{"url":"https://api.github.com/repos/stuartsierra/component/issues/45","repository_url":"https://api.github.com/repos/stuartsierra/component","labels_url":"https://api.github.com/repos/stuartsierra/component/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/stuartsierra/component/issues/45/comments","events_url":"https://api.github.com/repos/stuartsierra/component/issues/45/events","html_url":"https://github.com/stuartsierra/component/issues/45","id":125847991,"number":45,"title":"Cljs source files requiring component break refresh for clj code","user":{"login":"zonotope","id":1419863,"avatar_url":"https://avatars.githubusercontent.com/u/1419863?v=3","gravatar_id":"","url":"https://api.github.com/users/zonotope","html_url":"https://github.com/zonotope","followers_url":"https://api.github.com/users/zonotope/followers","following_url":"https://api.github.com/users/zonotope/following{/other_user}","gists_url":"https://api.github.com/users/zonotope/gists{/gist_id}","starred_url":"https://api.github.com/users/zonotope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonotope/subscriptions","organizations_url":"https://api.github.com/users/zonotope/orgs","repos_url":"https://api.github.com/users/zonotope/repos","events_url":"https://api.github.com/users/zonotope/events{/privacy}","received_events_url":"https://api.github.com/users/zonotope/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-01-10T21:48:49Z","updated_at":"2016-11-16T15:27:55Z","closed_at":"2016-11-16T15:27:54Z","body":"If you call `(clojure.tools.namespace.repl/refresh)` in a project repl which contains clj and cljs source that both require `com.stuartsierra.component`, the function call is reported as successful, but it doesn't seem as if any namespaces are actually reloaded after they're unloaded.\n\nThe quickest way to reproduce the problem is using the [duct](https://github.com/weavejester/duct) template:\n\n``` bash\n$ lein new duct tester +cljs +site\n$ cd tester\n$ lein setup\n```\n\nThen put the following in `src/cljs/tester/core.cljs`\n\n``` clojurescript\n(ns tester.core\n  (:require [com.stuartsierra.component :as component]))\n```\n\nThen, back at the shell:\n\n``` bash\n$ lein repl\nuser=> (go)\n```\n\nVisiting localhost:3000 gives a welcome page, but after calling `(do (stop) (refresh) (start))` at the repl, no connections to the web server can be established even though all the functions return either `:ok` or `:started` with no error. \n\nIf you kill the repl, run `lein clean`, and modify the above clojurescript source so that the component library isn't required, everything works as expected.\n\nIt looks like the problem comes from unloading and reloading the component library while there is compiled clojurescript code that uses component on the classpath. If I modify `clojure.tools.namespace.reload/track-reload-one` to skip both unloading and reloading the component namespace during refresh calls, everything works fine then. \n"},"comment":{"url":"https://api.github.com/repos/stuartsierra/component/issues/comments/260974812","html_url":"https://github.com/stuartsierra/component/issues/45#issuecomment-260974812","issue_url":"https://api.github.com/repos/stuartsierra/component/issues/45","id":260974812,"user":{"login":"zonotope","id":1419863,"avatar_url":"https://avatars.githubusercontent.com/u/1419863?v=3","gravatar_id":"","url":"https://api.github.com/users/zonotope","html_url":"https://github.com/zonotope","followers_url":"https://api.github.com/users/zonotope/followers","following_url":"https://api.github.com/users/zonotope/following{/other_user}","gists_url":"https://api.github.com/users/zonotope/gists{/gist_id}","starred_url":"https://api.github.com/users/zonotope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonotope/subscriptions","organizations_url":"https://api.github.com/users/zonotope/orgs","repos_url":"https://api.github.com/users/zonotope/repos","events_url":"https://api.github.com/users/zonotope/events{/privacy}","received_events_url":"https://api.github.com/users/zonotope/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T15:27:54Z","updated_at":"2016-11-16T15:27:54Z","body":"@stuartsierra I can confirm that the problem I am seeing is due to that [tools.namespace ticket](http://dev.clojure.org/jira/browse/TNS-45) you linked above.\r\n\r\nThe suggested workaround using `set-refresh-dirs` fixes the problem for me. Executing the following form from my `user` namespace (or any other namespace loaded by the repl) works for me:\r\n\r\n```clojure\r\n(clojure.tools.namespace.repl/set-refresh-dirs \"dev\" \"src\" \"test\")\r\n```\r\n\r\nI am closing this issue as it is not a component bug."}}
{"actor":{"display_login":"zonotope"}}