Repository navigation
fix(bindings): Make generation deterministic with CLI version pinning - #245
Open
presidojay1 wants to merge 2 commits into
Open
presidojay1 wants to merge 2 commits into
presidojay1 wants to merge 2 commits into
Conversation
Create scripts/toolchain.env to pin stellar CLI version: - Pin STELLAR_CLI_VERSION to 27.1.0 - Centralizes toolchain version management - Ensures local and CI environments use identical versions - Foundation for deterministic bindings generation This addresses the core issue where bindings output varies based on which stellar CLI version is installed locally.
Update gen-bindings.sh for deterministic bindings output: - Source scripts/toolchain.env for version pinning - Verify stellar CLI version matches STELLAR_CLI_VERSION (27.1.0) - Fail with clear error message on version mismatch - Support ALLOW_CLI_MISMATCH=1 override with warning - Replace associative array with fixed iteration order - Ensures consistent generation across machines and CI Changes iteration from unordered bash associative array to ordered list, eliminating iteration-order variance in output. Prevents bindings drift from CLI version differences that cause CI failures and silent client incompatibilities.
|
@presidojay1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Implements deterministic bindings generation by pinning the stellar CLI version and enforcing it during generation. This is the foundation fix for issue - preventing bindings drift caused by CLI version differences between local development and CI.
Changes
1. Toolchain Version Pinning (
scripts/toolchain.env)STELLAR_CLI_VERSION=27.1.02. Generation Script Enforcement (
scripts/gen-bindings.sh)scripts/toolchain.envat startupALLOW_CLI_MISMATCH=1override (with warning)Problem Solved
Before:
After:
Error Messages
ERROR: stellar CLI version mismatch Expected: 27.1.0 Installed: 28.0.0 Install the correct version with: cargo install --locked stellar-cli --version 27.1.0 Or set ALLOW_CLI_MISMATCH=1 to proceed anyway (not recommended).Testing
Verified that:
ALLOW_CLI_MISMATCH=1bypasses check with warningFollow-up Work
This PR addresses the core determinism issue (CLI pinning + ordered iteration). Full implementation of #121 would add:
networksconstantThose enhancements can be layered on this foundation in subsequent PRs.
CI Impact
CI should be updated to source
scripts/toolchain.env:Closes #121
Closes #122
Closes #123
Closes #124