Cache seems invalidated because of a suspicious date
Discussed in https://github.com/fable-compiler/Fable/discussions/3978
Originally posted by joprice December 17, 2024 I'm curious whether the current behavior I'm seeing is correct when rebuilding after a single line change. I find that when I run fable with a command like
dotnet fable cli/Cli.fsproj -e .fs.js -o cli/js --runScript "notifications"
the first build takes about 15s. The second is less than a second and finishes with Skipped compilation because all generated files are up-to-date!,
but after a single line change, I see output that seems to indicate the entire project is being recompiled (Compiled 221/224, etc), including files in the fable_modules folder, which, of course, I didn't modify. The time taken is the same as the full recompile, which makes me think that build caching only works for the exact same input, and not on incremental changes, or my environment or build is somehow misconfigured causing this.
Is this to be expected and if so, is there any way to improve it? It's my main frustration right now working with fable, so I'd be willing to contribute some time if it could help.
One thing that surprise me, is I am pretty sure in the past Fable was able to only recompile the file depend on the changed file.
But it seems like now, it always recompile everything all the time.
@alfonsogarciacaro Do you confirm that in the past, watch mode was able to be more selective?
I think the fast compilation I had in mind in the past is thanks to:
I think I know what the problem is. In watch mode Fable only compiles files with modifications.
https://github.com/fable-compiler/Fable/issues/3184#issuecomment-1251760175