https://github.com/tmpfs/spack-infinite-loop-mvp
Reproduce an spack infinite loop with certain module graphs
https://github.com/tmpfs/spack-infinite-loop-mvp
Last synced: 4 months ago
JSON representation
Reproduce an spack infinite loop with certain module graphs
- Host: GitHub
- URL: https://github.com/tmpfs/spack-infinite-loop-mvp
- Owner: tmpfs
- Created: 2021-06-30T00:42:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T06:04:06.000Z (almost 4 years ago)
- Last Synced: 2025-01-05T02:12:15.925Z (6 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spack Infinite Loop
This repository reproduces a bug with `spack` that causes it to loop infinitely on certain module graphs.
For more information see [this issue](https://github.com/swc-project/swc/issues/1756).
---
First install dependencies with `yarn install` then run:
```
npx spack
```In another terminal run `top` and notice that `spack` is using all available CPU cycles.
## Details
This is the module graph:
```
index.js
└── ./ui/store/actions
├── ../pages/send/send.utils
│ ├── ../../helpers/utils/token-util
│ │ └── ./confirm-tx.util
│ │ └── ../../store/actions (∞ -> /home/muji/git/consensys/spack-infinite-loop-mvp/ui/store/actions.js)
│ └── ./send.constants
│ └── ../../../app/scripts/lib/util
│ └── ../../../shared/constants/app
├── ../../app/scripts/lib/util
│ └── ../../../shared/constants/app
└── ../ducks/alerts/unconnected-account
└── ../../store/actions (∞ -> /home/muji/git/consensys/spack-infinite-loop-mvp/ui/store/actions.js)
```We can clearly see that the cycle is on `../../store/actions` but the bug itself is triggered by *this particular module graph*. To verify this comment out *any import* in the module graph and the build will succeed - even leaf nodes like `../../../shared/constants/app`!