Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: 馃拹 incremental builds are idempotent #885

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cratelyn
Copy link
Contributor

this branch makes a collection of small tweaks to the librocksdb-sys crate's
build script. these changes improve incremental builds of the library, by
adding conditional early returns that check if the rocksdb bindings, rocksdb
library, and snappy library have already been generated or compiled.

currently, repeated builds of the librocksdb-sys library are never considered
fresh. for projects that rely on rocksdb as backing storage, this can create
a bottleneck in builds, and lead to spuriously recompiling dependent libraries.

this tweaks the `bindgen_rocksdb()` function in the build script so that
it will only generate bindings to `/rocksdb/c.h` if the `bindings.rs`
file does not already exist in the output directory.
@cratelyn cratelyn force-pushed the kate/build-rs-does-not-regenerate-bindings branch from 5f1a423 to cf0f2d7 Compare May 14, 2024 16:14
@cratelyn
Copy link
Contributor Author

cratelyn commented May 14, 2024

i pushed an (identical) ammended commit, hoping to try re-running CI. i don't see anything in particular about these changes that would lead to the linker errors observed in CI.

i have reproduced the errors observed in CI. i am still hunting down a solution, but feel optimistic that i should be able to figure out how to avoid linking errors when compiling integration tests.

i am going to mark this PR as a draft until i've pushed a commit addressing that.

@cratelyn cratelyn marked this pull request as draft May 14, 2024 18:42
@cratelyn
Copy link
Contributor Author

the issues appear to be related to the trybuild snapshot tests. there's an unfortunate interaction between the build script and cargo's test runner, i'm debugging further over in cratelyn#2.

@jhult
Copy link

jhult commented May 29, 2024

@cratelyn, any news?

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.

None yet

2 participants