actions-rs / toolchain

🛠️ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

The installed toolchain should become the default #210

Open aminya opened 2 years ago

aminya commented 2 years ago

Do the checklist before filing an issue:

Motivation

The current behaviour for not setting the installed toolchain as default is very unintuitive. When I use action-rs to install a toolchain, I am expecting it to be the toolchain that I will use.

Workflow example

      - name: Setup rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          default: true       # this should be true by default!

Additional context

This has caused me a lot of trouble when I wanted to use a nightly feature, but no matter what I did I could not find the reason. Until I realized that action-rs does not set the installed nightly toolchain as default, and the rustc installed on the GitHub images were being used.

Then this is the moment that I realized that for such a long time, even for the projects that use a stable toolchain, action-rs has been just downloading a toolchain consuming the minutes I paid for in the CI without having any impact on the build.