-
Notifications
You must be signed in to change notification settings - Fork 195
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
Nix-Flakes: Dev-Server does not recognize file changes on new IHP version #1714
Comments
So when you change the source nothing happens at all? Is there any output in the terminal? Can you post the terminal output beginning from you starting the dev server? |
No, there is no output at all. Marc already had a look on the terminal output but I send it to you anyhow: 20:56:11 system | devServer.1 started (pid=252603) 20:57:00 devServer.1 | GET /IDE/code.css |
That looks indeed normal, weird. How did you start the dev server exactly? Maybe try cloning the repo again from scratch? |
devenv up
We tried this already, same issue. Interesting observation: on old disaya commits it was working, after we pulled latest main of disaya, the same bug happend |
Does perhaps deleting the |
No unfortunately not. |
Can confirm this is also happening to me on Ubuntu 22.04 when running with the new |
Okay, I still have no real answers, but here's an update. I just tried various things with @InftyCat. Running In a project where the IHP version used still has What that tells me: probably the culprit is not devenv as process manager or the devenv command. Either we broke something unrelated with the file watcher in the DevServer, or some of the changes we did to the build process had a side effect affecting the RunDevServer binary, breaking it in the process. What's interesting is that at this point I know of multiple people and devices where we use the new devenv stuff with IHP: some with MacOS, some with NixOS, and some with Ubuntu or Debian. From this selection, the problems seem to only occur on Ubuntu and Debian. It doesn't seem to be a problem with the Nix version, I just did an The only other idea I have right now is that something about how Ubuntu/Debian handle their filesystem mounting or home directory might break file watching, but it still doesn't make sense that it's only triggered by our devenv build... Will look into that anyway. I might try reproducing this in a Ubuntu VM... |
By the way, tagging @pauldub, who wrote the devenv integration, in case you have any ideas what might cause this... |
$ direnv --version
2.32.3 |
I have been playing with a Ubuntu VM today and I can confirm and reproduce these problems. I was also in addition getting this when trying to run
This works as expected on my NixOS system. Are you also getting this @CSchank / @InftyCat / @amitaibu ? |
@kodeFant I don't recall seeing this error before no! |
@kodeFant No, I haven't seen this |
thanks, likely unrelated then |
I'm catching up with the thread, my first impression is that it should not be related to devenv. I'll look into debugging these issues and confirm the root cause. |
Just to emphasize that my experience (and the occasional stuck |
And I'm having the same thing when trying to run IHP 1.0.1 but after using |
I've not been able to reproduce the issue on an Ubuntu VM after starting a fresh project pointing to IHP 80373b2 commit. I've also tested the latest commit on the Looking through the logs posted by @InftyCat we can see that there is no @kodeFant any tip on how I could reproduce the issue? I've recorded a video so you can see the reload in action: devenv_reload_test_ubuntu.mov |
@pauldub Running Ubuntu on a qemu virtual machine installed from image with default desktop setup I just used Then I exited Each time I restart the system, it's back to not working, and only works again when I delete |
Thanks 👍 Maybe something is in the directories that is breaking the file watcher. I think at the beginning the file watcher starts indexing all the files and then listens for file changes. Maybe there is some bug in the initial building of the file list |
I've been able to reproduce the issue on a qemu VM, I'll try and see if excluding |
@kodeFant would you be so kind as to test this commit: pauldub@8f2fa65 ? I've changed the file watcher so that instead of blindly watching everty tree of the root directory it only watche file changes in the root directory and watches sub-trees that are not the |
@pauldub Replaced Autoreloading now works consistently in my VM, and I am no longer able to reproduce the issue :) |
Thank you all! 🎉 Although I'm still wondering why this didn't occur on NixOS or macOS. Some system-specific implementation differences in the file watcher I guess? |
So, sorry, is this now fixed without us having to do anything? Or do you have to do something with the url like @kodeFant mentioned? |
@CSchank once it's merged, it will work for everyone running the latest IHP version 👍 |
Thank you for this thread. For another data point, I wanted to add I was having the exact same issue since I moved to the new flake + devenv up approach, with the same direnv version, on Debian, and pauldub's fix worked perfectly. |
This is still not working for me on macOS (I'm having the absolute worst luck with this new Nix Flakes approach!). I created a new project using |
I have the same problem on NixOS. I created a new project with ihp-new and changes are not detected when staring with neither ./start nor devenv up. I also have to restart the server for the changes to take effect. |
I can reproduce this on macOS 👍 |
Thanks! It fixed my problem as well. |
Both in the new disaya version and textcontent I have trouble to autoreload. F5 also does not work. The only thing that worked yet is restarting the server.
The text was updated successfully, but these errors were encountered: