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

cargo-build-sbf: Use metadata.solana.tools-version in Cargo.toml #2914

Merged
merged 6 commits into from
Oct 8, 2024

Commits on Oct 8, 2024

  1. cargo-build-sbf: Use solana.tools-version in Cargo.toml

    #### Problem
    
    It's possible to specify the version of the platform-tools version using
    the `--tools-version`, but most people aren't aware of the different
    versions of the compiler, or that they can use the flag.
    
    #### Summary of changes
    
    Allow `cargo-build-sbf` to read from the metadata section of a package
    or workspace Cargo.toml. The concept is similar to
    `rust-toolchain.toml`, where cargo finds the right version of Rust. For
    cargo-build-sbf, it can read:
    
    ```toml
    [package.metadata.solana]
    tools-version = "v1.43"
    ```
    
    Or
    
    ```toml
    [workspace.metadata.solana]
    tools-version = "v1.43"
    ```
    
    To go with this change, since I often forget leading "v" in the version
    string, the version parsing now allows for omitting the leading "v", so
    you can specify `--tools-version 1.43`.
    joncinque committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    a06764a View commit details
    Browse the repository at this point in the history
  2. Relax leading "v"

    joncinque committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    a14c10a View commit details
    Browse the repository at this point in the history
  3. Add CHANGELOG entry

    joncinque committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    d6f57d7 View commit details
    Browse the repository at this point in the history
  4. Special-case default run

    joncinque committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    24e9849 View commit details
    Browse the repository at this point in the history
  5. Add tests

    joncinque committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    73a5ba9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6422835 View commit details
    Browse the repository at this point in the history