Closed mecha1 closed 8 years ago
FYI I also updated the boot version to latest (2.4.2) and added a boot.properties
file to pin the version.
Nice! Thanks for this. I'm just not sure where the :directories
is coming from, here. I left a note on the line in question.
Good point, I think :source-paths
is better here. I updated the pull request accordingly.
Source-paths won't work correctly as it doesn't include resource-paths
, which might include clj
files. Or source-paths could even be empty and all sources could be in resource-paths.
Also, instead of looking directly at input directories, it's better to watch the boot temp directories. This way if you have namespaces created by boot tasks, they would also work correctly.
Also, if input-directories are watched, it's possible that ns-tracker
will see some namespaces as changed before the change is synchronized to Boot temp dir and thus classpath.
Better points. :-) I think what we really want are just the synchronized input dirs, but it doesn't look like there is a way to get that out of the env aside from :directories
. I can easily revert back to this. @pandeiro, thoughts?
I don't actually use the :reload
parameter much myself, so I'll defer to @Deraen and those who do. I'm not actually sure what :directories
even is -- is this a special key in the Boot environment? Are there docs anywhere for that?
I had a chat w/micha on slack to ask about this. He recommended using :directories
as well, and noted that we can get access to it from boot.pod/env
as well. The stuff in :directories
are the input dirs (source + resource); or more specifically the locations boot manages in order to maintain its immutable fileset abstraction for the input dirs.
@mecha1 Sorry for taking a while. Gonna merge this, bump the snapshot, and test it out more thoroughly OK? Thanks a lot!
thanks!
I noticed that reloading doesn't work unless your source directory starts with
src
. @Deraen pointed out that this is becauseboot-http
callswrap-reload
without specifying the:dirs
option, so it defaults to only reloading things undersrc
. This patch feeds the:directories
from the boot environment into the call towrap-reload
so that reloading will work for whatever source directories are configured.