Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Profile not respected when rust-toolchain file is present #72

Open
roblabla opened this issue Apr 16, 2020 · 0 comments
Open

Profile not respected when rust-toolchain file is present #72

roblabla opened this issue Apr 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@roblabla
Copy link

Description

When a rust-toolchain file is present, the first invocation of rust-toolchain will cause it to download the specified toolchain before executing the command. Toolchain starts by issuing a rustup show, which will pull the entire toolchain (with docs and all) before it has a chance to set the profile.

Workflow code

https://github.com/MegatonHammer/linkle/blob/master/.github/workflows/ci.yml#L34

Notice that at the root of the repo, linkle has a rust-toolchain file specifying the exact rust version in use.

Action output

2020-04-16T22:34:36.0589784Z ##[group]Run actions-rs/toolchain@v1
2020-04-16T22:34:36.0589995Z with:
2020-04-16T22:34:36.0590096Z   profile: minimal
2020-04-16T22:34:36.0590189Z   default: false
2020-04-16T22:34:36.0590263Z   override: false
2020-04-16T22:34:36.0590353Z ##[endgroup]
2020-04-16T22:34:36.5867846Z [command]C:\Rust\.cargo\bin\rustup.exe show
2020-04-16T22:34:37.2864063Z Default host: x86_64-pc-windows-msvc
2020-04-16T22:34:37.2865945Z rustup home:  C:\Users\runneradmin\.rustup
2020-04-16T22:34:37.2866332Z 
2020-04-16T22:34:37.3284425Z info: syncing channel updates for '1.42.0-x86_64-pc-windows-msvc'
2020-04-16T22:34:38.2496283Z info: latest update on 2020-03-12, rust version 1.42.0 (b8cedc004 2020-03-09)
2020-04-16T22:34:38.2502795Z info: downloading component 'cargo'
2020-04-16T22:34:38.5366370Z info: downloading component 'clippy'
2020-04-16T22:34:38.7433766Z info: downloading component 'rust-docs'
2020-04-16T22:34:39.3043959Z info: downloading component 'rust-std'
2020-04-16T22:34:40.5843526Z info: downloading component 'rustc'
2020-04-16T22:34:45.2767614Z info: downloading component 'rustfmt'
2020-04-16T22:34:45.5245996Z info: installing component 'cargo'
2020-04-16T22:34:46.7297457Z info: installing component 'clippy'
2020-04-16T22:34:47.1278658Z info: installing component 'rust-docs'
2020-04-16T22:35:24.1909816Z info: installing component 'rust-std'
2020-04-16T22:35:25.5992336Z info: installing component 'rustc'
2020-04-16T22:35:32.3399201Z info: installing component 'rustfmt'
2020-04-16T22:35:32.8065802Z 1.42.0-x86_64-pc-windows-msvc (overridden by '\\?\D:\a\linkle\linkle\rust-toolchain')
2020-04-16T22:35:33.2786796Z rustc 1.42.0 (b8cedc004 2020-03-09)
2020-04-16T22:35:33.2978065Z [command]C:\Rust\.cargo\bin\rustup.exe -V
2020-04-16T22:35:33.3104072Z rustup 1.21.1 (7832b2ebe 2019-12-20)
2020-04-16T22:35:33.3138148Z Installed rustup 1.21.1 support profiles
2020-04-16T22:35:33.3142655Z [command]C:\Rust\.cargo\bin\rustup.exe set profile minimal
2020-04-16T22:35:33.6254726Z info: profile set to 'minimal'
2020-04-16T22:35:33.6292333Z [command]C:\Rust\.cargo\bin\rustup.exe toolchain install 1.42.0
2020-04-16T22:35:33.7250173Z info: syncing channel updates for '1.42.0-x86_64-pc-windows-msvc'
2020-04-16T22:35:33.8301865Z 
2020-04-16T22:35:33.8497081Z   1.42.0-x86_64-pc-windows-msvc unchanged - rustc 1.42.0 (b8cedc004 2020-03-09)
2020-04-16T22:35:33.8497456Z 
2020-04-16T22:35:33.8507677Z info: checking for self-updates
2020-04-16T22:35:33.8919155Z ##[group]Gathering installed versions
2020-04-16T22:35:33.9179529Z [command]C:\Rust\.cargo\bin\rustc.exe -V
2020-04-16T22:35:33.9477354Z rustc 1.42.0 (b8cedc004 2020-03-09)
2020-04-16T22:35:33.9826013Z [command]C:\Rust\.cargo\bin\cargo.exe -V
2020-04-16T22:35:34.0146277Z cargo 1.42.0 (86334295e 2020-01-31)
2020-04-16T22:35:34.0466135Z [command]C:\Rust\.cargo\bin\rustup.exe -V
2020-04-16T22:35:34.0587717Z rustup 1.21.1 (7832b2ebe 2019-12-20)
2020-04-16T22:35:34.0613780Z ##[endgroup]

Expected behavior

I expect the rustup profile to be set before it starts downloading components, to avoid accidentally downloading the rust-docs. Perhaps it should cd into a temporary folder in order to set the profile without accidentally triggering an automatic toolchain download?

@roblabla roblabla added the bug Something isn't working label Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant