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
.cljs.edn not reloaded? #108
Comments
@magomimmo can you paste your task definition? I think task order is most likely the source of this problem :) |
(deftask dev thanks!
|
Ok that seems right. One thing to keep in mind is that changing Have you looked at the generated shim? (The file you load in your html page) |
whan I save the cljs.edn requires. I see the reload notification in the console of the developer tool (chrome) which notifies me about But if I look into the if could be helpful, you can checkout the following repo: https://github.com/magomimmo/modern-cljs/tree/se-tutorial-04 if you launch the delete the following files
remove relaunch the
Even if everything get reloade, the HIH to better understand the behaviour. Thanks so much for your help. |
Thanks for the update, I'll take a look some time later today, deep in the middle of some other stuff right now :) |
take your time! and thanks again. |
Hi Martin, the problem persists even if I do not use the .cljs.edn file to overwrite When I add new cljs files/namespaces I have to stop boot/JVM to see the new cljs/namespaces in the You can test it with this minimal repo: https://github.com/magomimmo/modern-cljs/tree/boot-cljs-testing You can test by yourself doing the following: git clone https://github.com/magomimmo/modern-cljs.git
cd modern-cljs
git checkout boot-cljs-testing
boot dev then visit Then you could procede as follows after having stopped the rm html/css/styles.css
rm html/login.html
rm src/cljs/modern_cljs/login.cljs
boot dev Finally, you could start readding the deleted file to the project while the # in a second terminal
cd /path/to/modern-cljs
git checkout -- html/css/styles.css
git checkout -- html/login.html
git checkout -- src/cljs/modern_cljs/login.cljs to verify that no Thanks again for your support. Probably I'm doing something very stupid somewhere.... |
The problem with the example is not related to compiler options, but probably due to a bug with Boot-cljs logic about writing main namespace shim only when cljs.edn file has been changed: https://github.com/adzerk-oss/boot-cljs/blob/master/src/adzerk/boot_cljs.clj#L207-L212 This probably also causes the problems with adding require entries to manually created cljs.edn.
|
TLDR; I don't recommend changing |
thanks so much. I’m in the process to migrate the entire I’ll workaround this problem and check if the problem is in the cljs compiler. thanks again
|
I’ll check. Thanks
|
Did a bit more debugging. The cljs.edn change logic is okay. But cljs.edn is read only once: https://github.com/adzerk-oss/boot-cljs/blob/master/src/adzerk/boot_cljs.clj#L100-L114 |
@magomimmo Could you try with latest master? I think this should fix this both with automatically generated cljs.edn and manually created: 5a614c7 |
Also, now that cljs.edn is correctly read each time, it is possible that changing compiler-options works. |
Juho, I’m going to a funeral of a friend right now :-(. I’ll check the master tomorrow morning… mimmo
|
Hi Juho, I checked the master and as soon as I copy a file, even a css file, while the
It seem to have to do with the following known problem: Thanks for your help |
The above said, now the |
Okay, now boot-cljs seems to work correctly but it has revealed a bug in boot-reload. It's because boot-reload will try to reload non-reloadable namespaces, such as the shim ns. For now you'll just need to do full reload when changing |
Hi, when I use
*.cljs.edn
to change the defaultoutput-to
andasset-path
compiler options, if I'm working in a kind of Immediate Feedback Development Environment (i.e. boot-http + watch + boot-reload + boot-cljs-repl + boot-cljs) and create a new cljs file/namespace, even if I add the new namespace to the corresponding:require
section of the aboveedn
file, to see the effects I have to stopboot
and relaunch it, which is annoying.Is there a trick I don't know about, or it's a known feature/issue?
Thanks
The text was updated successfully, but these errors were encountered: