Skip to content
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

Presence of symlinks generated by nix development environments breaks live reload / file watching #13083

Open
1 task
thilobillerbeck opened this issue Jan 28, 2025 · 0 comments
Labels
needs triage Issue needs to be triaged

Comments

@thilobillerbeck
Copy link

thilobillerbeck commented Jan 28, 2025

Astro Info

Astro                    v5.1.7
Node                     v22.12.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind
                         @astrojs/mdx
                         @astrojs/sitemap
                         astro-icon
                         astro-favicons

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When symlinked files created by a Nix development environment (like a flake.nix) are present in a projects folder, live reload stops working.

This does not change when adding said files to either the ignorelist under fs nor under watch in the vite settings.

To make this bug reproducible, I set up the reproduce-symlink-bug branch in our project (the NixOS homepage) that provides an environment to easily reproduce the bug.

git clone --branch reproduce-symlink-bug https://github.com/NixOS/nixos-homepage.git

After cloning, entering the flake.nix dev environment with the inputsFrom = [ config.pre-commit.devShell ]; line commented out will result in an environment where live reload works perfectly. After uncommenting, the presence of the then generated .pre-commit-config.yaml symlink now breaks live reloading. Commenting out and deleting the symlink again returns the environment to its normal function.

This seems to be an Astro related bug, since I cannot reproduce it with either a blank Vite project nor with a blank script using chokidar.

related NixOS/nixos-homepage#1641

What's the expected result?

When changing files under the condition that the symlinked files are present, the site should still reload.

Link to Minimal Reproducible Example

https://github.com/NixOS/nixos-homepage/tree/reproduce-symlink-bug

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant