idyll-lang / idyll

Create explorable explanations and interactive essays.
http://idyll-lang.org/
MIT License
2.01k stars 87 forks source link

Automatic reload running idyll in WSL: it seems not work #759

Open aborruso opened 2 years ago

aborruso commented 2 years ago

Describe the bug Hi, I'm using idyll in windows subsystem for linux. If I modify index.idyll and save it, and then reload http://localhost:3000/, I do not have the variations in the browser.

To Reproduce Steps to reproduce the behavior:

  1. install idyll on WSL
  2. create a project,
  3. run idyll and wait for the browser,
  4. edit the index file and reload the browser

Expected behavior To see the variations in the browser.

Desktop (please complete the following information):

Additional context I know, this is probably not up to idyll, it's up to WSL :(

mathisonian commented 2 years ago

Thanks for reporting this @aborruso. Can you confirm that things re-compile as expected if you stop and restart the idyll command after making a change?

I can take a look on WSL later this week; idyll should also work outside of WSL in the standard windows shell

aborruso commented 2 years ago

If I stop and restart, things recompile properly.

Thank you very much

mathisonian commented 2 years ago

Hi @aborruso - sorry I haven't been able to take a proper look at this yet. If you are able would you be willing to help debug? The errant behavior is likely somewhere in this code https://github.com/idyll-lang/idyll/blob/master/packages/idyll-cli/src/index.js#L215-L237

Likely either (i) a file path is being improperly constructed and so changes aren't properly triggering a rebuild or (ii) the path is correct but the watch function isn't firing for some reason. To test against a local copy of idyll see the steps here https://github.com/idyll-lang/idyll/blob/master/CONTRIBUTING.md#making-changes

aborruso commented 2 years ago

thank you @mathisonian I hope to be able to do it ;)