mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
fix(ci): support Cargo 1.100 artifact layout in cleanup fixture (#5010)
Cargo 1.100 moves intermediate compiler artifacts into per-unit build directories and emits `build_script_build` instead of `build-script-build`. The unlocked-build fixture currently fails on its old rlib path before the SDK build starts, even though the library survives cleanup. Discover compiler inputs recursively and accept both build-script names while preserving the library, generated-input, ordinary-executable, discarded-test, linker-failure and outside-target assertions. The standalone fixture reproduces the failure before this change and passes afterward on Rust/Cargo 1.100.0; it also passes on 1.97.0. Fault injection confirms missing libraries and other retained inputs still fail their assertions. Production cleanup and normal workflow coverage are unchanged.
This commit is contained in:
@@ -88,9 +88,11 @@ class BuildNoLockTest(unittest.TestCase):
|
||||
self.assertTrue((target / "fixture_cli").is_file())
|
||||
# Cargo guarantees this binary for test execution, not compile-time reads.
|
||||
subprocess.run([str(target / "fixture_cli")], check=True)
|
||||
self.assertTrue(list((target / "deps").glob("libartifact_fixture*.rlib")))
|
||||
self.assertTrue(list((target / "build").glob("*/build-script-build")))
|
||||
self.assertTrue(list((target / "build").glob("*/out/generated.rs")))
|
||||
# Cargo 1.100 nests compiler inputs in per-unit build directories and
|
||||
# names the build-script executable build_script_build.
|
||||
self.assertTrue(list(target.rglob("libartifact_fixture*.rlib")))
|
||||
self.assertTrue(list((target / "build").rglob("build[-_]script[-_]build")))
|
||||
self.assertTrue(list((target / "build").rglob("out/generated.rs")))
|
||||
|
||||
def test_link_failure_preserves_cargo_status_and_diagnostic(self):
|
||||
with tempfile.TemporaryDirectory(prefix=".no-lock-", dir=SCRIPT.parent) as temp:
|
||||
|
||||
Reference in New Issue
Block a user