Skip to content

cli: Warn if a manifest has solana-program dependency#3250

Merged
acheroncrypto merged 2 commits into
otter-sec:masterfrom
acheroncrypto:cli-warn-if-a-manifest-has-solana-program-dependency
Sep 14, 2024
Merged

cli: Warn if a manifest has solana-program dependency#3250
acheroncrypto merged 2 commits into
otter-sec:masterfrom
acheroncrypto:cli-warn-if-a-manifest-has-solana-program-dependency

Conversation

@acheroncrypto

Copy link
Copy Markdown
Collaborator

Problem

Adding solana-program to the dependencies list in Cargo.toml should be avoided, as it's likely to increase the possibility of version conflicts between v1 and v2 (#3219). Users should instead use the exported anchor_lang::solana_program.

Summary of changes

Warn if a user's manifest has solana-program dependency:

WARNING: Adding `solana-program` as a separate dependency might cause conflicts.
To solve, remove the `solana-program` dependency and use the exported crate from `anchor-lang`.
`use solana_program` becomes `use anchor_lang::solana_program`.
Program name: `my-program`

@vercel

vercel Bot commented Sep 14, 2024

Copy link
Copy Markdown

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit e6a7d69 into otter-sec:master Sep 14, 2024
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant