Skip to content

chore(vesting): remove orphan files + fix CI avm install - #36

Merged
PetarStoev02 merged 3 commits into
mainfrom
chore/vesting-remove-orphan-files
Jun 26, 2026
Merged

PetarStoev02 merged 3 commits into
mainfrom
chore/vesting-remove-orphan-files

Conversation

@PetarStoev02

@PetarStoev02 PetarStoev02 commented Jun 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Two unrelated cleanups, bundled because the CI fix is needed to land either change on a green branch.

1. Remove orphan files (follow-up to #35)

Removes two source files left over from the module renames (errors to error, states to state) done during review:

  • programs/vesting/src/errors.rs
  • programs/vesting/src/states.rs

Neither was declared in lib.rs and neither is referenced anywhere in the crate, so this has no functional effect. Pure source-tree cleanup.

2. Fix CI: avm install MSRV mismatch

The Install Anchor step has been failing on every recent PR and on main:

rustc 1.89.0 is not supported by the following package:
  cargo-platform@0.3.3 requires rustc 1.91

Root cause: the solana job's working-directory is solana/<package> (e.g. solana/staking), which contains a rust-toolchain.toml pinning rustc to 1.89.0. When cargo install ... avm runs from there, rustup uses the pinned 1.89 instead of the stable toolchain installed by dtolnay/rust-toolchain@stable. avm's lockfile pins cargo-platform@0.3.3, which requires rustc 1.91+.

Fix: override working-directory to ${{ github.workspace }} for the CLI installs (avm, surfpool). The repo root has no rust-toolchain.toml, so cargo uses the dtolnay-installed stable. The per-package pin still applies to the subsequent anchor build/anchor test steps, so the program builds with the same toolchain as before.

Verification

$ rg 'crate::(errors|states)|mod (errors|states)' solana/vesting
(no matches)

Test plan

  • rg confirms no references to deleted modules
  • CI green on this PR (validates the avm install fix)

These files were left behind after PR #35 renamed the modules to
error.rs and state.rs to align with the staking program. They were
not declared in lib.rs and not referenced anywhere, so they had no
effect on the build, but they cluttered the source tree.
@PetarStoev02 PetarStoev02 changed the title chore(vesting): remove orphan errors.rs and states.rs chore(vesting): remove orphan files + fix CI avm install Jun 26, 2026
The solana job's working-directory is solana/<package>, which contains
a rust-toolchain.toml pinning rustc to 1.89.0. When cargo install runs
from there, rustup respects the pin and uses 1.89 instead of the
stable toolchain installed by dtolnay/rust-toolchain@stable.

avm's transitive dep cargo-platform@0.3.3 requires rustc 1.91+, so the
install fails with "rustc 1.89.0 is not supported".

Overriding working-directory to ${{ github.workspace }} (repo root,
no rust-toolchain.toml) for the CLI installs makes them use the
dtolnay-installed stable. The per-package rust-toolchain.toml still
applies to the subsequent anchor build/test steps.
@PetarStoev02
PetarStoev02 force-pushed the chore/vesting-remove-orphan-files branch from 5cb36cf to 3d7dad8 Compare June 26, 2026 10:10
…onflict

anchor-bankrun@0.5.0 declares a peer dep on @coral-xyz/anchor@^0.30.0,
but the vesting package depends on @coral-xyz/anchor@^0.32.1. The peer
dep is soft (the bankrun API is stable across 0.30-0.32), but npm ci
refuses to install without acknowledging the mismatch.

Scoped to solana/vesting only via local .npmrc so other packages are
unaffected.
@PetarStoev02
PetarStoev02 merged commit aeac8c0 into main Jun 26, 2026
12 checks passed
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.

1 participant