You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7bd7e58
Browse filesBrowse the repository at this point in the historyBrowse files
Spell files below source dir "." without a leading "./" (#8940)
* Spell files below source dir "." without a leading "./"
Why:
With a source dir "." (or "./src"), `rescript` rebuilt the same modules
and everything depending on them on every build, while `rescript-rust`
compiled nothing. Discovery joined the dir to each file name, giving
"./A.res", but bsc records "A.res" in the AST and outputs are expected
at "A.js" and "ui/U.js". Cleanup matched no AST to "./A.res" and removed
it, and the inventory of "." listed "./ui/U.js", which matched no
module's output, so the next build removed it and recompiled U.
For a package with `"sources": [{"dir": "."}, {"dir": "ui"}]`:
Before (text): unchanged builds of that package
Cleaned 1/2
Parsed 1 source files
Compiled 1 modules
After (text): unchanged builds of that package
Cleaned 0/2
Parsed 0 source files
Compiled 0 modules
Discovery now drops "." segments from file paths, and the output path of a
module of the package root no longer starts with "./". Directory paths stay
as written, so `-bs-gentype-source-dir`, `.sourcedirs.json` and
`-bs-package-output` are unchanged.
Review: Why not normalize where paths are compared?
Cleanup, parse freshness, compile assets and the output inventory all key
on these paths; fixing their spelling once covers every comparison.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Paul Tsnobiladzé <2479216+tsnobip@users.noreply.github.com>
* Spell out-of-source outputs of root modules without "/./"
With `"in-source": false`, the output path of a module of source dir "."
was "lib/es6/./A.mjs" while the output inventory finds "lib/es6/A.mjs".
Only the missing lib/bs mirror kept cleanup from deleting the real output,
so the output path now drops every "." segment, and the shared test also
builds the out-of-source layout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Paul Tsnobiladzé <2479216+tsnobip@users.noreply.github.com>
---------
Signed-off-by: Paul Tsnobiladzé <2479216+tsnobip@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments