Lake silently accepts import of built-and-then-removed library
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- build-system
Línea de trabajo
Start by reading src/lake/Lake/Build/Module.lean, especially fetchImportInfo and its handling of findModules results. Trace how workspace import artifacts, ModuleSetup.importArts, and build-time LEAN_PATH interact for the missing-library case, then check the relevant Lake build tests. Done means rebuilding Foo fails after Bar is removed, while toolchain imports such as Init still work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Lake detects when a module of an existing library is missing even if its .olean file exists but does not do so if the library itself is missing.
Steps to Reproduce
lakefile.toml:
name = "repro"
[[lean_lib]]
name = "Foo"
[[lean_lib]]
name = "Bar"
Bar.lean:
def bar := 1
Foo.lean:
import Bar
def foo := bar
lake build Foo Bar- Remove the
Barlibrary fromlakefile.tomland deleteBar.lean. - Change
Foo.lean(for example, add a comment) and runlake build Foo.
Expected behavior: The build fails, because no library provides Bar.
Actual behavior: Foo is rebuilt against the stale .lake/build/lib/lean/Bar.olean and the build succeeds. After rm -rf .lake, the same build fails:
error: Foo.lean:1:0: unknown module prefix 'Bar'
No directory 'Bar' or file 'Bar.olean' in the search path entries:
Versions
Lean (version 4.37.0-pre, x86_64-unknown-linux-gnu, commit a9678c19851a8209310ed748045bae7425d5d60e, Release)
Additional Information
fetchImportInfo in src/lake/Lake/Build/Module.lean skips an import when findModules returns no module, which is also the path taken for toolchain modules such as Init. Lake already passes the artifacts of every workspace import to Lean through ModuleSetup.importArts, so the workspace entries in the build-time LEAN_PATH only serve this fallback. The stale file is also not part of the build trace.
- Lenguaje dominante
- Lean
- Estrellas
- 10.3k
- Forks
- 1.1k
- Merge medio
- 19 h 8 min
- PR fusionados (30 d)
- 421
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 leanprover/lean4
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
leanprover/lean4#16681 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
leanprover/lean4#16305 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
leanprover/lean4#16299 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
leanprover/lean4#16257 ·
Los mantenedores suelen responder en 1 día
-
`IO.FS.realPath` reports every failure as `noFileOrDirectory` instead of classifying by `errno`Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
leanprover/lean4#15683 ·
Los mantenedores suelen responder en 1 día
Todos los issues de leanprover/lean4
Issues similares
-
hermes-queue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
chrisalunlloyd2-sudo/mindpalace#430 ·
Los mantenedores suelen responder en 1 día
-
[问题] 导出文件时,提示后面还有1243390911步Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
jhaizhou-ops/S2Arm#2177 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
drydocs/meridian#1503 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
itinance/react-native-fs#1270 ·