Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 1.66.0 install.sh fails when --without flag is used #105755

Closed
jonhoo opened this issue Dec 15, 2022 · 10 comments · Fixed by #106196
Closed

Rust 1.66.0 install.sh fails when --without flag is used #105755

jonhoo opened this issue Dec 15, 2022 · 10 comments · Fixed by #106196
Labels
C-bug Category: This is a bug. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Dec 15, 2022

The 1.66.0 release broke something around the --without flag to install.sh. If I download and extract https://static.rust-lang.org/dist/rust-1.66.0-x86_64-unknown-linux-gnu.tar.gz, and then run, say

./install.sh --prefix="$PWD/installed" --without=rust-analyzer

it errors out with

install: uninstalling component 'rustc'
install: uninstalling component 'rust-std-x86_64-unknown-linux-gnu'
install: creating uninstall script at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'rust-docs-json-preview'
install: installing component 'rust-demangler-preview'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component '-preview'
install: error: manifest for -preview does not exist at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/-preview/manifest.in. see logs at '/home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/install.log'

The same thing happens when other components are named in --without. The install completes successfully when --without isn't used. It appears the problem is with the new rust-docs-json-preview component, because the install is successful with

./install.sh --prefix="$PWD/installed" --without=rust-docs-json-preview
@jonhoo jonhoo added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Dec 15, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 15, 2022
@Mark-Simulacrum Mark-Simulacrum added the P-low Low priority label Dec 15, 2022
@Mark-Simulacrum
Copy link
Member

I think given the workaround this is P-low.

@jonhoo
Copy link
Contributor Author

jonhoo commented Dec 15, 2022

Note that the workaround doesn't work when combined with rust-docs, so:

$ ./install.sh --prefix="$PWD/installed" --without=rust-docs,rust-docs-json-preview
install: creating uninstall script at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component '-json-preview'
install: error: manifest for -json-preview does not exist at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/-json-preview/manifest.in. see logs at '/home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/install.log'

@jonhoo
Copy link
Contributor Author

jonhoo commented Dec 15, 2022

rust-analysis also appears to be broken:

$ ./install.sh --prefix="$PWD/installed" --without=rust-analysis
install: creating uninstall script at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'rust-docs-json-preview'
install: installing component 'rust-demangler-preview'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component '-x86_64-unknown-linux-gnu'
install: error: manifest for -x86_64-unknown-linux-gnu does not exist at /home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/-x86_64-unknown-linux-gnu/manifest.in. see logs at '/home/jongje/166/rust-1.66.0-x86_64-unknown-linux-gnu/installed/lib/rustlib/install.log'

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Dec 15, 2022

I think we stopped shipping rust-analysis at some point?

Oh: probably not yet: #101841.

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 16, 2022
@JakubOnderka
Copy link
Contributor

I think given the workaround this is P-low.

I think you should reprioritize this issue as this workaround doesn't work when other components are mentioned in --without argument as mentioned by @jonhoo. This issue affects building our internal rust Docker image.

@Mark-Simulacrum Mark-Simulacrum added P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed P-low Low priority regression-untriaged Untriaged performance or correctness regression. labels Dec 21, 2022
Mark-Simulacrum added a commit to Mark-Simulacrum/rust-installer that referenced this issue Dec 21, 2022
It's not entirely clear what changed in 1.66, but rust-lang/rust#105755
shows that we are failing to run the install script with --without if
there are subsetted component names.

This changes the behavior of the filtering to require an *exact* match
rather than a partial match, which seems like the better way to go. It's
not very clear to me that the previous behavior was actually a good
idea.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust-installer that referenced this issue Dec 21, 2022
It's not entirely clear what changed in 1.66, but rust-lang/rust#105755
shows that we are failing to run the install script with --without if
there are subsetted component names.

This changes the behavior of the filtering to require an *exact* match
rather than a partial match, which seems like the better way to go. It's
not very clear to me that the previous behavior was actually a good
idea.
@Mark-Simulacrum
Copy link
Member

rust-lang/rust-installer#119 is a potential fix, we'll see if we can get it reviewed.

I believe, based on looking at the code, the workaround of passing full names (e.g., rust-analyzer-preview rather than rust-analyzer) or similar should work. rust-lang/rust-installer#119 makes that required for any effect at all.

I'm not quite sure what changed with the addition of rust-docs-json-preview, it might be mostly coincidence that this actually had an effect on your particular invocations.

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 29, 2022
…n514

Bump rust-installer

`--without=component-a,component-b` now requires full component names. This fixes rust-lang#105755 (rust-lang/rust-installer#119).

dev-static build succeeded, and installer script seems to work (see comment in thread).
@bors bors closed this as completed in 0018bcc Dec 29, 2022
@jonhoo
Copy link
Contributor Author

jonhoo commented Dec 30, 2022

Should that PR be tagged relnotes? Feels like it may be useful to call out for anyone using --without

@Mark-Simulacrum
Copy link
Member

Tagged!

@khvzak
Copy link

khvzak commented Jan 12, 2023

As Rust 1.66.1 still broken, workaround:

--without=rust-docs-json-preview,rust-docs

Other components can be added just after the rust-docs, eg: --without=rust-docs-json-preview,rust-docs,rls-preview,rust-analyzer-preview

@Mark-Simulacrum
Copy link
Member

We'll aim to backport the PR for 1.67, but we didn't include it in 1.66.1, so that's not surprising that nothing changed.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jan 19, 2023
* `--without=component-a,component-b` now requires full component names.
  This fixes rust-lang#105755 (rust-lang/rust-installer#119).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants