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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update solana dependency version to allow 2.0.0 #6182

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

willhickey
Copy link
Contributor

There are transitive dependencies from the solana monorepo that lead to split dependencies when the monorepo version number is bumped to 2.0. For example:

solana-account-decoder v2.0.0 
├── solana-config-program v2.0.0 
│   ├── solana-program-runtime v2.0.0 
│   │   ├── solana-measure v2.0.0 
│   │   │   └── solana-sdk v2.0.0 
│   │   │       ├── solana-program v2.0.0       <--------
├── spl-token v4.0.0
│   ├── solana-program v1.17.14                 <--------

This leads to type incompatibilities.

@mergify mergify bot added the community Community contribution label Jan 25, 2024
@willhickey willhickey requested a review from joncinque January 25, 2024 22:46
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple of questions to make sure I understand the intention

Anchor.toml Outdated
@@ -1,6 +1,6 @@
[toolchain]
anchor_version = "0.29.0"
solana_version = "1.17.13"
solana_version = ">=1.17.13,<=2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if Anchor supports this syntax? I don't think it does, so unless you're sure that it works, we should probably keep this as is

@@ -16,4 +16,4 @@ cpi = ["no-entrypoint"]
default = []

[dependencies]
solana-program = "1.17.13"
solana-program = ">=1.17.13,<=2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a little test, and specifying it in this way means that it will only ever pull in "2.0.0" and nothing higher. Would it make more sense to relax this further as:

Suggested change
solana-program = ">=1.17.13,<=2.0.0"
solana-program = ">=1.17.13,<=2"

Then it can eventually pick up v2.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good idea. I was thinking it should be as restrictive as possible but we can always tighten the bound once we introduce an incompatibility.

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for doing this!

@willhickey willhickey merged commit 8938033 into master Jan 26, 2024
48 checks passed
@willhickey willhickey deleted the whickey_dependency_version_bump branch January 26, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants