Skip to content

webstorm symlink hang repro #296

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions make-lots-of-symlinks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const fs = require('fs');
const path = require('path');

/**
* @param {number} n
*/
function* range(n) {
for (let i = 0; i < n; i++) {
yield i;
}
}

const base = 'dist/node_modules';

fs.mkdirSync(base, { recursive: true });

for (const i of range(100)) {
fs.mkdirSync(`${base}/repro${i}/node_modules`, { recursive: true });
for (const j of range(i)) {
const target = `repro${j}`;
const directory = `${base}/repro${i}/node_modules`;
fs.symlinkSync(
path.relative(directory, `${base}/${target}`),
`${directory}/${target}`
);
}
}