Skip to content

ci(rust): build before testing so the dummy driver can be loaded - #5030

Open
edgarrmondragon wants to merge 1 commit into
apache:mainfrom
edgarrmondragon:rust-1.100-dir-layout
Open

edgarrmondragon wants to merge 1 commit into
apache:mainfrom
edgarrmondragon:rust-1.100-dir-layout

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Cargo 1.100's new build directory layout no longer places cdylibs on the library search path during cargo test, so the exported dummy driver tests fail to find libadbc_dummy. Running cargo build first uplifts the cdylib into the target directory, which is on the search path (rust-lang/cargo#8311).

Locating the cdylib from Cargo's JSON messages would let cargo test work on its own, but that requires the tests to invoke Cargo themselves (cargo build --message-format=json), which seemed like more than this needs.

I noticed this failing in another PR: https://github.com/apache/arrow-adbc/actions/runs/43370376029/job/131704477304?pr=5029

For context, from the 1.100 release notes1:

Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use Cargo’s JSON messages to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. (build cache doc) #17354

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

Footnotes

  1. https://doc.rust-lang.org/stable/releases.html#:~:text=Cargo%20now%20uses%20a%20new%20directory ↩

Cargo 1.100's new build directory layout no longer places cdylibs on the
library search path during `cargo test`, so the exported dummy driver
tests fail to find libadbc_dummy. Running `cargo build` first uplifts the
cdylib into the target directory, which is on the search path
(rust-lang/cargo#8311).

Locating the cdylib from Cargo's JSON messages would let `cargo test` work on
its own, but that requires the tests to invoke Cargo themselves
(`cargo build --message-format=json`), which seemed like more than this needs.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@edgarrmondragon
edgarrmondragon marked this pull request as ready for review November 13, 2026 06:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant