Deleted generated file is not regenerated while the project cache is valid
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- fsharp, javascript
- 領域
- compilers
調査の方向性
Start by reading getFilesToCompile and areCompiledFilesUpToDate in src/Fable.Cli/Main.fs, then trace how the project cache is written and read. The fix is done when a deleted output is regenerated without repeatedly recompiling sources that legitimately produce no output; the issue suggests tracking those sources alongside the cache.
索引モデルが issue の本文から書いたものです。
説明
With a warm cache, deleting one generated file and running Fable again reports Skipped compilation because all generated files are up-to-date!, exits 0, and the file stays missing.
- Create a project with two files,
Lib.fsandMain.fs, and compile it once:dotnet fable Test.fsproj --outDir out rm out/Lib.jsdotnet fable Test.fsproj --outDir out
Expected: out/Lib.js is regenerated. Actual: the run is skipped and out/Lib.js is still missing. Reproduced on Linux with Fable built from main, JavaScript target; the logic is target independent.
Cause: getFilesToCompile in src/Fable.Cli/Main.fs selects a source whose output is missing, then areCompiledFilesUpToDate treats a missing output as up to date and skips the compilation it was just asked for. The --noCache flag forces a re-crack, which disables the skip, so that is the workaround.
The obvious fix, returning false for a missing output, was tried in #4870 and dropped. Fable never writes an output file when the generated code is empty, and erased bindings generate nothing, so a missing output cannot be told apart from a never-written one. With that change every project depending on a bindings package recompiles on every run: Feliz has 29 sources and 9 outputs, Fable.ReactDom.Types has one source and none.
A fix needs Fable to remember which sources compiled to empty output, for example a list written next to the project cache after each compilation, so a missing output is treated as up to date only for a source in that list that is older than the list. Other approaches welcome.
Related: #4870.
- 主要言語
- F#
- スター
- 3.2k
- フォーク
- 335
- 平均マージ
- 18時間 57分
- マージ済み PR(30日)
- 154
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fable-compiler/Fable のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
fable-compiler/Fable#5280 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows automation repo-assist
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
fable-compiler/Fable#4531 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows automation repo-assist
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
fable-compiler/Fable#4522 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
fable-compiler/Fable#5281 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
fable-compiler/Fable#5279 ·
メンテナーはふだん 1 日以内に返信
fable-compiler/Fable の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
new issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
llvm/llvm-project#240065 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
CanadaHonk/porffor#452 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
JakeChampion/lang#14392 ·
メンテナーはふだん 1 日以内に返信