refactor(bindings): Refactor Taskfiles to avoid rebuilds if source unchanged#1261
Open
refactor(bindings): Refactor Taskfiles to avoid rebuilds if source unchanged#1261
Conversation
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
e1a675e to
8f47a1c
Compare
msardara
approved these changes
Feb 26, 2026
Build artifacts are no longer renamed before upload; original filenames
(libslim_bindings.{a,so,dylib}, slim_bindings.{dll,lib}) are preserved.
Downstream CI jobs restore each bindings-{TARGET} artifact directly into
data-plane/target/{TARGET}/release/, matching the local build layout.
Taskfile changes to align all language bindings with the target folder:
- rust/Taskfile.yaml: add sources/generates fingerprinting so
bindings:build:all is skipped when outputs are already up to date.
- go/Taskfile.yaml: rewrite copy-library to scan target/*/release/ for
all available platforms and derive platform-specific destination names
from the target triple; remove the CI-vs-local-build distinction.
- dotnet/Taskfile.yaml: add rust:bindings:build:all as a declared dep of
generate (fingerprinting prevents rebuilds when library is present);
rewrite copy:runtimes to scan target/*/release/ instead of an
artifacts/ directory; remove ARTIFACTS_DIR variable.
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
The glob pattern was hardcoded to */release/; use {{.PROFILE}} so
debug builds are found correctly.
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
The glob pattern was hardcoded to */release/; use {{.PROFILE}} so
debug builds are found correctly.
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Move the library path into a task-level var (LIB_FILE) and pass it directly to uniffi-bindgen-cs, matching how the Go bindings task uses LIB_PATH. The dep on rust:bindings:build:all guarantees the library exists, so the manual shell existence check is no longer needed. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
This makes sure that the fingerprinting is "stateless" and doesn't need to maintain a checksum in a separate file. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Replace the loop that scanned all target directories with a direct copy of the single library pointed to by LIB_PATH for the current TARGET and PROFILE, deriving the destination name from the target triple. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
8f47a1c to
8aef839
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refactor the Taskfiles to avoid rebuild the rust code if the libraries we want are already present and newer than the rust source code. This should work locally and in CI where we reload the files through artifacts to avoid rust builds getting triggered.
Type of Change
Checklist