google / google/wireit

[bug report] Wireit watch crashes recursively looping symbolic links in a npm workspaces context.

Open
#790 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.4k
Forks
128
Avg merge
4d 10h
Merged PRs (30d)
4

Description

## Describe the bug
It seems that wireit follows symbolic links when using the `--watch` option, it would work fine in most of cases but there is a rare one where if a project in a monorepo (npm workspaces) depends on the root project then it will keep looping inside the `node_modules` directory.
Here's a screenshot of what could possibly happens :
![image](https://github.com/google/wireit/assets/2827383/d72a3b16-0705-4939-888a-c8daced0e8db)

## To Reproduce
Best way to reproduce that is to actually try it in a real case scenario:
- Open a codespace (or clone on your local machine) material-web repository (https://github.com/material-components/material-web)
- Install the dependencies (`npm i`)
- Go inside catalog directory (`cd catalog`)
- Try to build watch (`npm run build:dev --watch`)

You should see the problem.

## Priority
This is probably a rare case but right now it's impossible for some users to contribute to the material-web catalog repository because of this issue.
Could happen to any monorepo project that set the root as one workspace (e.g. `"workspaces": [".", "foo"]`)

## Version
wireit : 0.9.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.