Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require syntax causes wrap-reload not to reload some namespaces #240

Open
leroix opened this issue Jan 27, 2016 · 6 comments
Open

require syntax causes wrap-reload not to reload some namespaces #240

leroix opened this issue Jan 27, 2016 · 6 comments
Labels

Comments

@leroix
Copy link

leroix commented Jan 27, 2016

I have a project where core.clj requiring looks something like this:

(:require 
            ...
            [rafl.ui-backend
             [api-proxy :as api]
             (apis :as apis)
             (config :refer [config])
             (auth :as auth :refer [ensure-auth-session])
             (raflapi :as raflapi)
             (hooahyoo :as hooahyoo)
             (entries :as entries)
             (filemaker :as filemaker)]
            [rafl.ui-backend.templates
             (index :as index)])

This [namespace (subnamespace1 :as x) (subnamespace2 :as y) ...] syntax seems to cause certain namespaces not to reload. For instance, core.clj reloads fine. However, a change to raflapi.clj is not reloaded. If, after changing raflapi.clj, I change core.clj, the change in raflapi.clj gets reloaded. I couldn't figure out a pattern that governed which namespaces would be reloaded properly.

[Fix] Flattening the require syntax causes all namespaces to be reloaded properly.

@weavejester
Copy link
Member

What happens if you use vectors instead of lists? e.g. [filemaker :as filemaker] instead of (filemaker :as filemaker)?

@leroix
Copy link
Author

leroix commented Jan 27, 2016

Nope, that doesn't seem to fix the problem.

@weavejester
Copy link
Member

Does adding the [org.clojure/tools.namespace "0.2.11"] dependency to your project fix the issue?

@leroix
Copy link
Author

leroix commented Jan 27, 2016

I guess I should also add that I'm using ring-core version 1.3.2 which is using 0.2.2 of ns-tracker.

Working on testing your suggestion.

@leroix
Copy link
Author

leroix commented Jan 27, 2016

Adding [org.clojure/tools.namespace "0.2.11"] doesn't seem to change anything.

@weavejester
Copy link
Member

This issue might require some code changes to ns-tracker. Sounds like it's not accounting for something.

@weavejester weavejester added the bug label Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants