Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Update token dependencies #6239

Merged
merged 4 commits into from
Feb 9, 2024
Merged

Update token dependencies #6239

merged 4 commits into from
Feb 9, 2024

Conversation

willhickey
Copy link
Contributor

In preparation for bumping the monorepo version to 2.0.0, relax some of the internal dependencies.

@mergify mergify bot added the community Community contribution label Feb 9, 2024
CriesofCarrots
CriesofCarrots previously approved these changes Feb 9, 2024
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

lgtm. I think we also need to bump this crate to v2.0.1 for release, right?

@mergify mergify bot dismissed CriesofCarrots’s stale review February 9, 2024 18:08

Pull request has been modified.

@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Feb 9, 2024

I'm actually surprised we haven't run into this before. @joncinque , have you seen any conflict issues trying to publish spl-token-2022 in the past? The token-group-interface and token-metadata-interface dependencies are probably pretty new to the monorepo, but memo has been in there forever.

This is what the conflict looked like, incidentally:

$ cargo package
   Packaging spl-token-2022 v2.0.0 (/solana-program-library/token/program-2022)
   Verifying spl-token-2022 v2.0.0 (/solana-program-library/token/program-2022)
    Updating crates.io index
error: failed to verify package tarball

Caused by:
  failed to select a version for `spl-memo`.
      ... required by package `solana-transaction-status v1.17.17`
      ... which satisfies dependency `solana-transaction-status = "=1.17.17"` of package `solana-rpc-client v1.17.17`
      ... which satisfies dependency `solana-rpc-client = "=1.17.17"` of package `solana-client v1.17.17`
      ... which satisfies dependency `solana-client = "=1.17.17"` of package `solana-banks-server v1.17.17`
      ... which satisfies dependency `solana-banks-server = "=1.17.17"` of package `solana-program-test v1.17.17`
      ... which satisfies dependency `solana-program-test = ">=1.17.17, <=2"` of package `spl-token-2022 v2.0.0 (/solana-program-library/target/package/spl-token-2022-2.0.0)`
  versions that meet the requirements `=4.0.0` are: 4.0.0

  all possible versions conflict with previously selected packages.

    previously selected package `spl-memo v4.0.1`
      ... which satisfies dependency `spl-memo = "^4.0.1"` of package `spl-token-2022 v2.0.0 (/solana-program-library/target/package/spl-token-2022-2.0.0)`

  failed to select a version for `spl-memo` which could resolve this conflict

I'm just sort of confused that we didn't see the same error publishing spl-token-2022 v0.9.0, which specifies spl-memo v4, when monorepo was on spl-memo = "=v3.0.1"

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Wouldn't hurt to get @joncinque 's sanity check, if he's around

@willhickey willhickey merged commit f9204f7 into master Feb 9, 2024
35 checks passed
@willhickey willhickey deleted the whickey_token-2022_dep branch February 9, 2024 19:01
@joncinque
Copy link
Contributor

Sorry for the late response, but it looks good!

And I think we got lucky beforehand because cargo does support multiple concurrent major versions in some situations. So it's valid for token-2022 to use memo v4 and the monorepo to use memo v3, but it's not valid for monorepo to require =4.0.0 but for token-2022 to use 4.0.1

@CriesofCarrots
Copy link
Contributor

And I think we got lucky beforehand because cargo does support multiple concurrent major versions in some situations. So it's valid for token-2022 to use memo v4 and the monorepo to use memo v3, but it's not valid for monorepo to require =4.0.0 but for token-2022 to use 4.0.1

Oh, cargo, you make no sense to my feeble human brain sometimes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants