This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-23
Channels
- # beginners (4)
- # boot (297)
- # cider (12)
- # cljs-dev (3)
- # clojure (49)
- # clojure-brasil (1)
- # clojure-quebec (1)
- # clojure-russia (36)
- # clojure-sg (4)
- # clojure-spec (21)
- # clojure-uk (3)
- # clojurescript (28)
- # cursive (3)
- # datascript (2)
- # datomic (3)
- # hoplon (63)
- # re-frame (1)
- # spirituality-ethics (2)
- # test-check (1)
- # testing (1)
- # yada (1)
Finishing my day with a successful boot test notify -a -T pillsbury
always makes me smile
it is the best theme ever!
I managed to get a "saapas" project up and running but I am not sure how the "watch/ reload" stuff works
what is responsible for watching and reloading changes in cljs files? and does the browser auto-reload auto-refresh or do I do that manually?
Have you seen this file ? https://github.com/Deraen/saapas/blob/master/build.boot#L75-L82 The watch and reload tasks are there
does it have anything to do with me not having vim? I am running this in a vagrant virtualbox
@isekream: does the browser js console show a message that the websocket connected and all that?
@isekream: definitely nothing to do with vim. The message should be "Reload websocket connected."
but when i edit the html, less or cljs files i do not see it being reflected unless I MANUALLY reload the browser i.e. F5
Below is my log output ---------------------------------------- Starting reload server on <ws://localhost:9001> Writing adzerk/boot_reload/init2403.cljs to connect to <ws://0.0.0.0:9001>... Writing boot_cljs_repl.cljs... Starting file watcher (CTRL-C to quit)... Compiling {less}... 2 changed files. Adding :require adzerk.boot-reload.init2403 to main.cljs.edn... nREPL server started on port 9000 on host 0.0.0.0 - <nrepl://0.0.0.0:9000> Adding :require adzerk.boot-cljs-repl to main.cljs.edn... Compiling ClojureScript... ? js/main.js
how important is are the sequence calls in executing tasks? should it be start-server-> watch->repl->cljs->reload?
says web sockets updated? but nothing happening when i try to edit/ modify any of the files....NOTHING happens no logs no compilation sequence no browser reload. i literally have to F5 everytime i edit the page
ah i'm looking at a boot.clj file in the saapas project and i note (disbale-realod!) i not it was set
if cljs files are loaded in the cache how does the project know when system files are modified?
with the exception of the host names and ports the boot file is pretty much the same
@micha i am not even sure what you mean by that i have a ubuntu virtual box running on OSX i'm running boot dev from the bash at root level. I have 3 ports available on the vagrant box all of which have responded well as i am able to repl remotely using http://atom.io editor
i am able to view the demo app via the browser through localhost. i get the "reload connected" console.log
and when you edit a file in http://atom.io, does it rebuild?
http://atom.io is on OSX
maybe http://atom.io is doing something weird?
@isekream: how are you mounting the folders?
"atom locks files over the network and does not release them”, seems to be a known issue for a while now
but I bet there is some lock that prevents boot from getting the update about the change
it’s probably a sync issue
@flyboarder: care to elaborate?
like however vagrant filesystem is syncing the copy, there is probably something that isnt releasing the copy so things think that an action on the file is still taking place
boot uses the fsevent api in linux via this guy https://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html
if you run boot with the -vv option like boot -vv dev
you can see a lot of debug output
and http://atom.io outside the vm
side note what is this -> ;; :open-file "vim --servername 0.0.0.0 --remote-silent +norm%sG%s| %s"
Ok but could you see the changes in vim guest os?
but this would mean that the reload is tied to only when the file is opened or saved rather than copied?
the file is being edited in the host environment and then copied to the guys environment
copying would involve either overwriting the target or modifying it in place, or creating it if it doesn't yet exist
Have you tried turning off udp in vagrant nfs settings?
no @flyboarder what will that prove?
yeah i mean it works fine without vagrant, or even in vagrant without the filesystem volume syncing
I'm wondering if vagrant is the issue
I'm looking at its docs for file syncing
actually the issues we saw were even worse, sometimes it would make corrupted or truncated files
You could also try the rsync option
Vagrant has an rsync option
ok tried editing in atom which would sync the file in the guest and nothing happened
Commit complete. Released java.util.concurrent.Semaphore@1b764bff[Permits = 1]... Acquired java.util.concurrent.Semaphore@55536d9e[Permits = 0]... Syncing project dirs to temp dirs... Filesystem: copying js/main.cljs.edn... Filesystem: copying frontend/.core.cljs.swp... Sync complete. Released java.util.concurrent.Semaphore@55536d9e[Permits = 1]...
@micha you mentioned something about you having the same issue....how did u resolve it?
This needs to go on the wiki!
Good find @micha
👍 i guess this whole week of sleepless night and energy life soul sucking agony has finally paid off huh 😞
@isekream: I have this issue also, means rebuilding my Mac every so often
the inotify-tools
package has stuff you can use in shell scripts to access the fsevents api directly
@micha @flyboarder tried using inotifywait and the following happened :-
@isekream: what is the issue with using rsync?
apparently rsync-auto is the default behaviour for vagrant with rsync
I would imagine that the forced sync would fire the fs events
you can also run rsync with sudo on guest
if the destination folder is restriced
@flyboarder: @micha: YOOUUUREEEKKAAA! we did it!
using vagrant with rsync triggers reloading when modified outside the guest environment
thanks guys for the extra help. I'm hoping the boot heads take note of this and add this to the troubleshooting/ support documentation
@isekream @micha https://github.com/boot-clj/boot/wiki/Boot-Troubleshooting#watch-task-not-receiving-filesystem-events-in-docker--vagrant Anything else to add or rephrase?
I'm trying to install boot, and I've copy-pasted the sudo bash -c "cd /usr/local/bin && curl -fsSLo boot
command from the README. But when I try something like boot repl I get this error. Can anyone give me any pointers?
Exception in thread "main" java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at Boot.download(Boot.java:168)
at Boot.install(Boot.java:224)
at Boot.main(Boot.java:250)