toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

use minimal supported rust version `rust-version` from Cargo.toml

Open EdJoPaTo opened this issue 4 years ago • 1 comments

Do the checklist before filing an issue:

  • [x] Is this related to the actions-rs Actions? If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community
  • [x] You've read the Contributing section about feature requests: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#feature-requests
  • [ ] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.

Motivation

Rust 1.56 added the Cargo manifest key rust-version to indicate the minimal supported rust version (MSRV).

It would be nice to only configure this only in a single location and use it automatically from ci.

Workflow example

The big question is probably how this would be useful as a config.

Adding a special key for this might be easier to understand but is error prone and has many unclear states.

      - uses: actions-rs/toolchain@v1
        with:
          # Dont use the toolchain key
          # toolchain: nightly
          override: true
          msrv: true

providing a special value to the toolchain value is also not as nice as I would like it to be.

      - uses: actions-rs/toolchain@v1
        with:
          toolchain: rust-version
          override: true

EdJoPaTo avatar Oct 21 '21 20:10 EdJoPaTo

Personally I'd like toolchain: msrv as you can already pass words like stable, nightly or beta to it. Then you can specify multiple toolchain versions in the matrix like [stable, beta, msrv] etc.

est31 avatar Jan 14 '22 15:01 est31