coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

cli: Sync program ids on the initial build #3023

Closed acheroncrypto closed 2 weeks ago

acheroncrypto commented 2 weeks ago

Problem

Latest versions of Anchor handles program id declarations automatically if the program is created using anchor init or anchor new. However, if the user downloads the program from GitHub, they would have to run anchor keys sync to update their program id to the correct id, and this causes confusion for new devs as mentioned in https://github.com/coral-xyz/anchor/issues/3022.

Summary of changes

Sync the program ids automatically on the first ever build (depending on target/deploy exists).

Resolves https://github.com/coral-xyz/anchor/issues/3022

vercel[bot] commented 2 weeks ago

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

A member of the Team first needs to authorize it.