8000 fix: resolve Anchor dependency conflicts in Rust client (#196) by hasip-timurtas · Pull Request #237 · metaplex-foundation/mpl-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: resolve Anchor dependency conflicts in Rust client (#196) #237

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hasip-timurtas
Copy link

Summary

Resolves dependency version conflicts between MPL Core Rust client and Anchor framework that prevented compilation of Anchor projects using MPL Core.

Problem

Issue #196: Users encountered expected 'anchor_lang::prelude::Pubkey', found '__Pubkey' errors when building Anchor projects with MPL Core due to incompatible solana-program version constraints.

Solution

Updated clients/rust/Cargo.toml dependency constraints:

- solana-program = "> 1.14"
+ solana-program = "^1.17"
- solana-program-test = "> 1.14"  
+ solana-program-test = "^1.17"
- solana-sdk = "> 1.14"
+ solana-sdk = "^1.17"

This aligns the client dependencies with the program's solana-program = "^1.17" constraint, ensuring consistent dependency resolution.

Testing

  • Verified successful compilation of Anchor + MPL Core projects
  • Confirmed no regression in existing functionality
  • Validated compatibility with Anchor 0.30.x

Impact

Enables developers to use MPL Core in Anchor-based applications without dependency conflicts.

Closes #196

…ersions

- Update solana-program from '> 1.14' to '^1.17' in clients/rust
- Update solana-program-test and solana-sdk to '^1.17' for consistency
- Resolves Pubkey type conflicts between Anchor and MPL Core
- Fixes issue where users couldn't build Anchor projects with mpl-core

Fixes metaplex-foundation#196
Copy link
vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mpl-core-js-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 5:08pm

Copy link
coderabbitai bot commented Jun 23, 2025

Summary by CodeRabbit

  • Chores
    • Updated Solana-related dependencies to ensure compatibility with version 1.17.

Walkthrough

The dependency versions for solana-program, solana-program-test, and solana-sdk in the Rust client's Cargo.toml file have been updated from > 1.14 to ^1.17 in both the main and development dependencies sections. No other dependencies or features were changed.

Changes

File(s) Change Summary
clients/rust/Cargo.toml Updated solana-program, solana-program-test, and solana-sdk dependency versions from > 1.14 to ^1.17 in dependencies and dev-dependencies.

Assessment against linked issues

Objective Addressed Explanation
Resolve dependency mismatch for building Metaplex Core NFT/PNFT project (#196)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were found.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e40184 and b52924f.

📒 Files selected for processing (1)
  • clients/rust/Cargo.toml (1 hunks)
🔇 Additional comments (2)
clients/rust/Cargo.toml (2)

29-29: Use a caret (^1.17) constraint for solana-program

Switching from > 1.14 to ^1.17 ensures semantic versioning alignment with the program and restricts the dependency to compatible 1.x releases. This change looks correct.


36-37: ```shell
#!/bin/bash
set -e

Search for all solana-sdk, solana-program-test, and solana-program version specifications across the repo

rg -n 'solana-(sdk|program-test|program)\s*=' .


</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcSHFcLzpIACIAM3gADy5/RHwvKUgAQQwGWHw+JW4yJRz5JgxYr3gxZHgsG2xEUIYq9kgACjMARgBOADYASmjIOUhGykhYNER4bjBxZmwKXGn0WloUxGlIQuKyBnkpChn8LHLK6twZElwAdxIyMNgSSABZKwAZSABhfJeGpqMVoYUKYei4Z5ZHJ5PixKhsW75ADWGhgzy2CgqVRqPH8Eng+EaXnkvBIUhBUQhLyYzG48C81AJWHwsShuXyuPwIhxEOoYy29HeX1+/gANPYigx4PEGGgfGU0I06kRIJQKPlkP4G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QfEqiNKshTSj4hqF9wNzzb2OL+Xyfkr6VX8vfGWjBLJhTQB+XaMh8BpXAkaJmHdmLIH0qRMkJAibcAtjsEgRRyI5CwfYW2UltrgR4hQPiAkWC+FEiQVEAA5PUKDngFBIXsch2wOSfmoEsFK5l9SKGlMxWgKFzCWEyF4EWPNop6lwS0ZwSiDZNm4PkVsHJPDemqKqEE6gsFGA4eQYupcDDawMJ7Ix9BtqKiNgHU2wcWAWzDhHRwDd5AO0UMoF2id3Yp1sbrNaBpcDdkzIgbseJmL3FoN2JozhQg2LsQIAArAAJh6FklyH5IYuQABwZL6F0IpLk+gkBhj0GGLkckZK6GgSGWSVBFNoD0AQDAPwZIEMnVOdjzbqCibQGJcSSAJO7PrfQQA= -->

<!-- internal state end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=metaplex-foundation/mpl-core&utm_content=237):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

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.

I can't Anchor build the Metaplex Core NFT project.
1 participant
0