Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow toolchain overriding in idl build command #2941

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

skrrb
Copy link
Contributor

@skrrb skrrb commented Apr 30, 2024

in order to build the idl, nightly toolchain is currently hardcoded in the code

const TOOLCHAIN: &str = "+nightly";

However, sometimes latest nightly may be incompatible with a given program. This pr allows to override the toolchain used by the idl build command via RUSTUP_TOOLCHAIN env, e.g.

RUSTUP_TOOLCHAIN=”nightly-2023-04-01" anchor idl build

Copy link

vercel bot commented Apr 30, 2024

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

A member of the Team first needs to authorize it.

@skrrb skrrb marked this pull request as ready for review April 30, 2024 13:13
@acheroncrypto acheroncrypto added the idl related to the IDL, either program or client side label Apr 30, 2024
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thanks, this was on my todo list too.

One potential concern is that using this could cause problems with anchor build command (due to cargo build-sbf invocation), but I've checked it, and it doesn't seem to care about the RUSTUP_TOOLCHAIN env variable.

It'd also be great to support overriding from CLI args, but that can be handled in a separate PR.

@acheroncrypto acheroncrypto merged commit 645ab6d into coral-xyz:master Apr 30, 2024
48 of 49 checks passed
@skrrb skrrb deleted the idl/toolchain branch May 1, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idl related to the IDL, either program or client side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants