Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

clojurescript - Emacs Cider with Shadow-cljs browser settings on Windows wsl2 hot code reload

I would like to get hotcode reload to work on Windows wsl2 in emacs/cider using shadow-cljs (it doesn't work with shell shadow-cljs watch command in the terminal as well).

I should say oddly 1 in every couple of tries using it it will actually run as it normal would in most which is very nice just isn't consistent for productivity if it doesn't work most the time.

The usual status is the repl will sit on the initial compile. On the browser shadow-cljs dashboard at port 9630 it says "Unknown, waiting for recompile" yet when a file is updated it never updates.

question from:https://stackoverflow.com/questions/66055215/emacs-cider-with-shadow-cljs-browser-settings-on-windows-wsl2-hot-code-reload

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In WSL2 file watching only works when used on the actual Linux filesystem. It does not work when working in the /mnt/c/... directories. WSL2 actually works much better when working in /home/....

There are a couple open issues on https://github.com/microsoft/WSL (eg. #4739) about this. It is not specific to shadow-cljs and affects many other file watchers.

For now if you want to work with the Windows files you should stick to WSL1 as it will be much faster. WSL2 is only faster when using the Linux filesystem but that makes working with those files from Windows a bit slower. WSL1 is still the better option when you want to work with the files from Windows IMHO.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...