web-build fails on a symlink inside a nested dot directory (an editor's cache, a virtualenv) and reports it as a failed type check
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, rust
- Domain
- build-system, tooling
Research direction
Start at host/web-js/build.mjs around line 395, where the directory walk skips dot entries only when top is true, and make the same rule hold at any depth. Compare with the mirrored rule in js/bake/src/lib.rs near line 834 (at == root && name.starts_with('.')), which the reporter left unchanged. Reproduce with the exact new symrepro script in the issue: the web build should exit 0 with the backend/.elixir_ls link present, and dot directories at any depth should be skipped like .exact/.
Written by the indexing model from the issue text.
Description
What happened
An app whose backend lives in a folder of its own stops building on the web once a tool has
left a symlink in a dot directory there. Ours is an Elixir backend in backend/: ElixirLS, the
Elixir editor extension, keeps backend/.elixir_ls/build/, which holds directory links
(lib/<app>/priv -> ../../../../priv). bun exact.mjs web-build then fails:
source links are not captured: <app>/backend/.elixir_ls/build/lib/app/priv
error: symrepro: app.ts failed the type check every host's build runs
symrepro: the web build (the JS target) failed; the wasm target is internal (--wasm)
A Python virtualenv does the same: with server/.venv/bin/python -> /usr/bin/python3 and no
.elixir_ls, the build fails on server/.venv/bin/python with the same headline.
Nothing in app.ts is wrong, and neither directory is source. The capture in
host/web-js/build.mjs skips dot directories only at the app's top level (if (top && name.startsWith('.') && entry.isDirectory()) continue;, line 395 on main at 65065d29a), so it
walks into backend/.elixir_ls/ and refuses the link. js/bake/src/lib.rs has the same rule
(at == root && name.starts_with('.'), line 834). The headline then names the type check, which
is not what failed, and the one line that names the link is easy to read past.
Fix: skip dot directories at any depth, as at the top. With top && removed from line 395,
the app below builds with the link in place (exit 0). I did not build a native target with the
same change to lib.rs. A headline naming the refused link, not the type check, would also help.
What I expected: a dot directory below the top level is no source either, and the build
leaves it out as it leaves out .exact/.
Host
Web (the bake's capture in js/bake has the same rule)
Smallest app that shows it
The app exact new writes, and one link:
bun <exact2>/scripts/exact.mjs new symrepro
cd symrepro
bun exact.mjs web-build # builds
mkdir -p backend/priv backend/.elixir_ls/build/lib/app
ln -s ../../../../priv backend/.elixir_ls/build/lib/app/priv
bun exact.mjs web-build # fails as above
Exact commit
65065d29a
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 62
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 126
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expo/exact
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
verify's reload check reads a form refused for a duplicate as a saved value that came back differentOpen
Difficulty 3/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
storytold/photocraft#15232 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
suhina-daw/suhina-daw#1477 ·
Maintainers usually reply within 1 day
-
parity priority: low ui
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
storytold/pdfcraft#7483 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
IngvarConsulting/unica#3097 ·
Maintainers usually reply within 1 day
-
enhancement in-progress
Difficulty 1/5 Under an hour Newbie friendliness 64/100