Skip to content

Conversation

madninja
Copy link
Contributor

The receiver SDK (or rather the generated anchor client) does not work with solana-program 2.0. Cargo does not know this though and ends up picking solana-program 2.0 which then blows up the downstream build.

This PR caps the solana-program dependency to < 2 and fixes a build warning

Copy link

vercel bot commented Oct 24, 2024

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

Name Status Preview Comments Updated (UTC)
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 7:04pm

Copy link

vercel bot commented Oct 24, 2024

@madninja is attempting to deploy a commit to the Pyth Network Team on Vercel.

A member of the Team first needs to authorize it.

@guibescos
Copy link
Contributor

guibescos commented Oct 25, 2024

I do agree capping Solana, but not with the other two changes:

  • I think the warning is fine and the solution is worse than the warning
  • I think it is fine to use the sdk with anchor 0.30.0; in fact this is enabled by capping the solana version
    What do you think?

@madninja
Copy link
Contributor Author

madninja commented Oct 25, 2024

I do agree capping Solana, but not with the other two changes:

  • I think the warning is fine and the solution is worse than the warning

Really? It's an unused variable.. is there another way to clean that up rather than living with warnings?

  • I think it is fine to use the sdk with anchor 0.30.0; in fact this is enabled by capping the solana version

We tried this helium helium-wallet-rs/helium-lib and that is not the case. Capping the solana version and leaving anchor the way it is picks anchor 0.30.1 which breaks the build in this crate. Are you suggesting capping anchor <= 0.30.0 ?

What do you think?

@madninja
Copy link
Contributor Author

I've bumped the cap for anchor lang to include 0.30.0 since that does appear to build correctly. Thanks for the sharp eyes!

@guibescos
Copy link
Contributor

Can you make a reproducible example where it doesn't work with 0.30.1? It works on my side

@madninja
Copy link
Contributor Author

madninja commented Oct 25, 2024

Can you make a reproducible example where it doesn't work with 0.30.1? It works on my side

Are you sure you did a cargo update after uncapping it to >= 0.28 again?

As an example I removed the anchor-lang change in this PR, and am using it here

helium/helium-wallet-rs#414

Resulting error: https://github.com/helium/helium-wallet-rs/actions/runs/11523949934/job/32083062729?pr=414#step:7:21

@guibescos
Copy link
Contributor

guibescos commented Oct 29, 2024

Hey, I got around your issue by running
cargo update -p [email protected] --precise 0.29.0 in your repo which updates the Cargo.lock to a good state.

I'm going to merge most of your changes from #2066, except capping anchor since we want to support recent versions of anchor.

Feel free to reopen if you have more issues.

@guibescos guibescos closed this Oct 29, 2024
@madninja
Copy link
Contributor Author

Hey, I got around your issue by running cargo update -p [email protected] --precise 0.29.0 in your repo which updates the Cargo.lock to a good state.

I'm going to merge most of your changes from #2066, except capping anchor since we want to support recent versions of anchor.

Feel free to reopen if you have more issues.

Gotcha.. that's unforunate since 1. that means that every downstream user of the helium-lib crate needs to re-pin anchor to 0.29.0. and 2. anyone not using 0.30.1 will have this issue using the pyth receiver sdk afaict

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.

2 participants