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

MSI installer is missing clippy and rustfmt #101993

Closed
Hawk777 opened this issue Sep 18, 2022 · 5 comments · Fixed by #131365
Closed

MSI installer is missing clippy and rustfmt #101993

Hawk777 opened this issue Sep 18, 2022 · 5 comments · Fixed by #131365
Assignees
Labels
C-bug Category: This is a bug. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Comments

@Hawk777
Copy link

Hawk777 commented Sep 18, 2022

I installed Rust 1.63.0 in Windows via the MSI installer. I enabled all optional features during the installation process. However, it seems that clippy and rustfmt are not available via the MSI installer. It seems that the MSI installer is oriented at development use and not just building existing Rust code from source for deployment (otherwise it wouldn’t include RLS, which is only useful for development), so there ought to be a way to get access to clippy and rustfmt through it—and one can’t just cargo install them, at least not clippy, because cargo install clippy reports that clippy is no longer available via crates.io.

Sorry if this is the wrong repo to report MSI installer issues; with 190 repos in the group, it can be hard to find the right one.

@Hawk777 Hawk777 added the C-bug Category: This is a bug. label Sep 18, 2022
@jyn514 jyn514 added the T-release Relevant to the release subteam, which will review and decide on the PR/issue. label Sep 18, 2022
@jyn514
Copy link
Member

jyn514 commented Sep 18, 2022

Hmm, there's code for clippy in dist.rs - not sure what's going wrong there, someone would need to investigate.

rust/src/bootstrap/dist.rs

Lines 1617 to 1633 in ed37111

builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("clippy")
.args(&heat_flags)
.arg("-cg")
.arg("ClippyGroup")
.arg("-dr")
.arg("Clippy")
.arg("-var")
.arg("var.ClippyDir")
.arg("-out")
.arg(exe.join("ClippyGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);

Rustfmt does appear to just be omitted altogether, that should be a simple fix.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Sep 19, 2022
@chenyukang
Copy link
Member

chenyukang commented Sep 20, 2022

I see rustfmt is not called with prepare, but clippy is there:

            prepare("clippy");
            for tool in &["rust-demangler", "rust-analyzer", "miri"] {
                if built_tools.contains(tool) {
                    prepare(tool);
                }
            }
            if target.ends_with("windows-gnu") {
                prepare("rust-mingw");
            }

@chenyukang
Copy link
Member

have a diff from cargo --list between rustup from installation and MSI installer:

9d8
<     clippy               Checks a package to catch common mistakes and improve your Rust code.
15d13
<     fmt                  Formats all bin and lib files of the current crate using rustfmt.
25d22
<     miri
46a44
>

seems miri also missing.

@Hawk777
Copy link
Author

Hawk777 commented Sep 20, 2022

Here’s a list of the files in the bin/ subdirectory of my install directory, in case it’s relevant:

  • cargo.exe
  • rls.exe
  • rustc_driver-17b2400b2defcd83.dll
  • rustc_driver-17b2400b2defcd83.pdb
  • rustc.exe
  • rustc_main-6addbff947989b19.pdb
  • rustdoc.exe
  • rust-windbg.cmd
  • std-2e5a4fde2066d4f2.dll
  • std-2e5a4fde2066d4f2.pdb
  • test-2fc9b45aeebba85a.dll
  • test-2fc9b45aeebba85a.pdb

@jyn514 jyn514 added O-windows Operating system: Windows T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Mar 1, 2023
@heiseish
Copy link
Contributor

@rustbot claim

bors added a commit to rust-lang-ci/rust that referenced this issue Oct 20, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#121560 (Allow `#[deny]` inside `#[forbid]` as a no-op)
 - rust-lang#131365 (Fix missing rustfmt in msi installer rust-lang#101993)
 - rust-lang#131647 (Register `src/tools/unicode-table-generator` as a runnable tool)
 - rust-lang#131843 (compiler: Error on layout of enums with invalid reprs)
 - rust-lang#131926 (Align boolean option descriptions in `configure.py`)
 - rust-lang#131961 (compiletest: tidy up how `tidy` and `tidy` (html version) are disambiguated)
 - rust-lang#131962 (Make `llvm::set_section` take a `&CStr`)
 - rust-lang#131964 (add latest crash tests)
 - rust-lang#131965 (remove outdated comment)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors closed this as completed in 17ac4c8 Oct 20, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 20, 2024
Rollup merge of rust-lang#131365 - heiseish:fix-issue-101993, r=Mark-Simulacrum

Fix missing rustfmt in msi installer rust-lang#101993

# Context
- Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer
- Fixed missing `rustfmt` for apple darwin installer
- Closes rust-lang#101993

r​? `@jyn514`
- Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs.
- I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference
- Will push fixes for linting later
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. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants