chore: implement incremental build for FableLibrary tasks#4438
chore: implement incremental build for FableLibrary tasks#4438MangelMaxime merged 10 commits intomainfrom
Conversation
|
@claude review |
Python Type Checking Results (Pyright)
Excluded files with errors (4 files)These files have known type errors and are excluded from CI. Remove from
|
2d9916f to
bd1b5c5
Compare
|
@claude review |
|
Claude finished @dbrattli's task in 2m 25s —— View job Code Review
The overall design is solid — SHA-256 content hashing with a simple cache file is a clean approach. The Bugs1. Typo in cache key — IncrementalBuild.run
$"fable-libary-%s{this.Language}" // "libary" missing an 'r'Should be 2. Dart glob pattern matches literal file named Path.Combine("src", "fable-library-dart", "**", "dart") // BUG: matches a file named "dart"
Path.Combine("src", "fable-library-dart", "**", "*.fs")The first pattern needs to be 3. Python quicktest: The new code: if (args |> List.contains "--force-fable-library") then
BuildFableLibraryPython(skipCore = skipFableLibraryCore).Run(true)
Command.Run("uv", $"pip install -e {fableLibraryBuildDir}")On the very first run (no cache, no The old code handled this by always building + installing unless Also: when Minor Issues4. No skip message — When the build is skipped, the function exits silently. The old code printed if isStale then
callback()
saveCache name inputHash
else
printfn $"Skipping %s{name} build (no changes detected)"5. Rust input patterns missing The 6. Pre-existing: duplicate Lines 7 and 8 both SummaryThe incremental build approach is a welcome improvement to the developer workflow. The Dart glob bug (#2) and Python quicktest regression (#3) are the most important to fix before merging. The typo (#1) is minor but creates a messy transition if fixed later. |
|
@claude Please review the PR, I made the changes to fix the issues you reported earlier |
|
Claude finished @MangelMaxime's task in 1m 2s —— View job Code Review (Follow-up)
All 6 issues from the previous review have been addressed. Here's the verification: 1. Typo in cache key — $"fable-library-%s{this.Language}" // "library" now spelled correctly2. Dart glob pattern — Path.Combine("src", "fable-library-dart", "**", "*.dart") // "*.dart" fixed3. Python quicktest The fix is elegant: the 4. Skip message — printfn "Skipping '%s' (inputs unchanged and outputs exist)" name5. Rust Path.Combine("src", "fable-library-rust", "Cargo.toml")6. Duplicate The implementation looks correct and ready to merge. The |
This PR introduce incremental build support for fable library tasks.
I was tired of always having to switch between
./build.sh quicktest javascriptand./build.sh quicktest javascript --skip-fable-library, etc.This PR replace
--skip-fable-librarywith an incremental build function.A SHA-256 hash of all input source files is computed and cached in
.build-cache/; a rebuild is skipped if the hash matches the last successful build and the output directory exists.A new flag
--force-fable-libraryhas been introduced allowing to force a rebuild of the fable library, independently of the cache status.@dbrattli I tried to update the
src/Fable.Transforms/Python/TYPE-ANNOTATIONS.mdfile to match the previous behavior but it would be nice if you could check it out.