Deleted generated file is not regenerated while the project cache is valid
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- fsharp, javascript
- Área
- compilers
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- F#
- Estrellas
- 3.2k
- Forks
- 335
- Merge medio
- 18 h 57 min
- PR fusionados (30 d)
- 154
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fable-compiler/Fable
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
fable-compiler/Fable#5280 ·
Los mantenedores suelen responder en 1 día
-
agentic-workflows automation repo-assist
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
fable-compiler/Fable#4531 ·
Los mantenedores suelen responder en 1 día
-
agentic-workflows automation repo-assist
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fable-compiler/Fable#4522 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
fable-compiler/Fable#5281 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
fable-compiler/Fable#5279 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fable-compiler/Fable
Issues similares
-
[P2] Interpreter: Array.prototype.findLastIndex starts at the wrong index for long array-likesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
llvm/llvm-project#240065 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
CanadaHonk/porffor#452 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
JakeChampion/lang#14392 ·
Los mantenedores suelen responder en 1 día