Lake silently accepts import of built-and-then-removed library
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 54/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- build-system
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Lean
- スター
- 10.3k
- フォーク
- 1.1k
- 平均マージ
- 19時間 8分
- マージ済み PR(30日)
- 421
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
leanprover/lean4 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
leanprover/lean4#16681 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
leanprover/lean4#16305 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
leanprover/lean4#16299 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
leanprover/lean4#16257 ·
メンテナーはふだん 1 日以内に返信
-
`IO.FS.realPath` reports every failure as `noFileOrDirectory` instead of classifying by `errno`オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
leanprover/lean4#15683 ·
メンテナーはふだん 1 日以内に返信
leanprover/lean4 の issue をすべて見る
似ている issue
-
sync cache dist/imgオープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
oleeskild/digitalgarden#435 ·
-
iyi test: parallel builds race fetching a module into a cold cache (Directory not empty)対応中かも @sdogruyol が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
Tarektouati/made#186 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
fluentmigrator/fluentmigrator#2463 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信