Skip to content

Conversation

@Techassi
Copy link

@Techassi Techassi commented May 19, 2025

This PR enables users to pin the rustup version used in this action, it defaults (to be non-breaking) to the current latest version (1.28.2). This would need updating in the future as soon as new rustup versions are available.

Note: I'm not one hundred percent certain that setting the env var on Windows works the same as on Linux-based systems. I have the suspicion we might need to use the set command on Windows. Please feel free to suggest how this is best tested. EDIT: The CI runs seem to suggest setting the env var worked as expected.

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

This would need updating in the future as soon as new rustup versions are available.

I am not interested in needing to do this. It would need to use rustup's latest release by default.

@Techassi
Copy link
Author

Alright, makes sense. I will update the PR accordingly asap.

@dtolnay
Copy link
Owner

dtolnay commented May 23, 2025

What is the intended behavior of

- uses: dtolnay/rust-toolchain
  with:
    rustup-version: N

when the runner contains a preinstalled rustup that is different from N?

@Techassi
Copy link
Author

That's a tough question.

One option could be to add a force flag input, which forces re-installation resulting in the following behaviour:

  • If installed in a different version: install the requested version
  • If installed in the same version: don't download, just use the installed version

@dtolnay
Copy link
Owner

dtolnay commented Jun 11, 2025

I think it would be better if this were handled by a separate action specifically for installing rustup. This action will just use whatever rustup has been installed by the time that this action runs.

@dtolnay dtolnay closed this Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants