-
Notifications
You must be signed in to change notification settings - Fork 1
fix: support for anchor 0.32.1 #31
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request introduces conditional compilation to abstract Pubkey type handling across the SDK, enabling it to resolve to either Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
sdk/Cargo.toml(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Run Tests
sdk/Cargo.toml
[error] 1-1: Cargo workspace manifest parse error: feature 'anchor' includes 'anchor-lang', but 'anchor-lang' is not an optional dependency. A non-optional dependency of the same name is defined; consider adding 'optional = true' to its definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/run-tests.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: lint
| - name: run integration tests | ||
| working-directory: program/tests/integration/use-randomness | ||
| run: | | ||
| export PATH="${{ needs.setup.outputs.solana_path }}:$PATH" | ||
| npm install -g @magicblock-labs/bolt-cli | ||
| cd program/tests/integration/use-randomness | ||
| export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | ||
| cargo install --locked --version ${{ env.anchor_version }} anchor-cli | ||
| anchor --version | ||
| npm install | ||
| bolt test | ||
| anchor test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent PATH setup: use needs.setup.outputs.solana_path for consistency.
Line 94 hardcodes the Solana binary path instead of using needs.setup.outputs.solana_path like other steps (lines 81, 87, 102). Hardcoded paths are fragile and break if the runner environment changes. This also makes maintenance harder.
Apply this diff to use the setup job's output consistently:
- name: run integration tests
working-directory: program/tests/integration/use-randomness
run: |
- export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
+ export PATH="${{ needs.setup.outputs.solana_path }}:$PATH"
cargo install --locked --version ${{ env.anchor_version }} anchor-cli
anchor --version
npm install
anchor test📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: run integration tests | |
| working-directory: program/tests/integration/use-randomness | |
| run: | | |
| export PATH="${{ needs.setup.outputs.solana_path }}:$PATH" | |
| npm install -g @magicblock-labs/bolt-cli | |
| cd program/tests/integration/use-randomness | |
| export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | |
| cargo install --locked --version ${{ env.anchor_version }} anchor-cli | |
| anchor --version | |
| npm install | |
| bolt test | |
| anchor test | |
| - name: run integration tests | |
| working-directory: program/tests/integration/use-randomness | |
| run: | | |
| export PATH="${{ needs.setup.outputs.solana_path }}:$PATH" | |
| cargo install --locked --version ${{ env.anchor_version }} anchor-cli | |
| anchor --version | |
| npm install | |
| anchor test |
🤖 Prompt for AI Agents
.github/workflows/run-tests.yml around lines 91 to 98: the step for running
integration tests hardcodes the Solana binary path (export
PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH") which
is inconsistent with other steps; update this line to prepend the path from the
setup job output (needs.setup.outputs.solana_path) so the PATH uses the shared
setup output (e.g., export PATH="${{ needs.setup.outputs.solana_path }}:$PATH"),
keeping the rest of the step unchanged to ensure consistent, robust environment
configuration.
Summary by CodeRabbit
Chores
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.