moonrepo / setup-rust

A maintained GitHub action for setting up Rust and Cargo.
84 stars 6 forks source link

Change behaviour of rust-toolchain config file #5

Closed Semptic closed 1 year ago

Semptic commented 1 year ago

Hi,

I would like to ask if it would be possible to change the behaviour of the config file in regards to following

When loading a configuration file, only the channel field is used, while the other fields are ignored. We chose this approach, as those other fields are typically for develop/release workflows, but not for CI, which requires a minimal/granular setup.

Couldn't be the default to use the settings from the file and allow it to be overridden by the specific settings in the config of the action (components, targets and profile)?

milesj commented 1 year ago

That approach was chosen because a lot of configs use profile = "default" (or complete), which over-installs what's necessary for each task. CI works best when the profile is minimal, and job's only pull in what they need. Format = rustfmt, Lint = clippy, etc.

I won't change the default here, but could wrap it in an option.

milesj commented 1 year ago

Added a inherit-toolchain setting.