go-app: Update of wasm binary doesn't trigger update of cached app
So here is very simple scenario
There is a message in main
function
fmt.Println("Launching wasm app")
it’s compiled and loaded, message appears in console.
Now change it to
fmt.Println("Launching wasm app 1")
Put cursor in address bar, press enter - nothing happens. Then press Ctrl-F5
(force reload), new message appears.
Then try pressing Ctrl-R
(regular reload), old message will come back, same if you put cursor in address bar and press enter - old message is there.
Tested in latest Firefox and Chrome on desktop.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 20 (8 by maintainers)
I dealt with this with a wrapper which periodically checks the modification / hash (and a
sync.RWMutex
, as you say, @inliquid)https://gist.github.com/tiedotguy/b8a29519c4690b45f89c003a37e36402
It’s a bit more complicated in reality 'cause I’ve got some fsnotify junk in there, but I don’t like that code, and it doesn’t contribute anything, so I’ve stripped it.