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

Require all paths passed to ShouldRun::paths to exist on disk #95906

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 10, 2022

This has two benefits:

  1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components).
  2. Bootstrap has better checks for internal consistency. This caught several issues:
  • src/sanitizers doesn't exist; I changed it to just be a sanitizers alias.
  • src/tools/lld doesn't exist; I removed it, since lld alone already works.
  • src/llvm doesn't exist; removed it since llvm and src/llvm-project both work.
  • src/lldb_batchmode.py doesn't exist, it was moved to src/etc.
  • install was still using src/librustc instead of compiler/rustc.
  • None of the tools in dist / install allowed using src/tools/X to build them. This might be intentional - I can change them to aliases if you like.

Builds on #95901 and should not be merged before.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2022
@jyn514 jyn514 force-pushed the enforce-valid-paths branch 4 times, most recently from 99985f9 to 507b798 Compare April 10, 2022 22:56
src/bootstrap/dist.rs Show resolved Hide resolved
src/bootstrap/dist.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member Author

jyn514 commented Apr 11, 2022

@rustbot label -S-waiting-on-review +S-waiting-on-author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2022
@jyn514 jyn514 force-pushed the enforce-valid-paths branch from 507b798 to 0990851 Compare April 12, 2022 22:55
@jyn514
Copy link
Member Author

jyn514 commented Apr 12, 2022

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 12, 2022
@@ -234,7 +234,7 @@ install!((self, builder, _config),
}).expect("missing analysis");
install_sh(builder, "analysis", self.compiler.stage, Some(self.target), &tarball);
};
Rustc, "src/librustc", true, only_hosts: true, {
Rustc, path = "compiler/rustc", true, only_hosts: true, {
Copy link
Member

Choose a reason for hiding this comment

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

x.py install is a bit of a mess I guess between paths and aliases. My tendency is to move towards the dist tarball names for simplicity (and maybe just universally support any of them; I suspect it might not be that hard with the relatively uniform tarball generation work @pietroalbini did a while back).

Can be a future PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, my impression is that x.py install isn't a super well trodden path in general - not sure who's using it. I can look into cleaning it up sometime in the next few weeks, I've been meaning to write up instructions for how to port a new architecture anyway and I suspect this will come up as part of the work. Leaving it be for now.

src/bootstrap/native.rs Outdated Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

@bors delegate+

r=me with changes made

@bors
Copy link
Contributor

bors commented Apr 16, 2022

✌️ @jyn514 can now approve this pull request

This has two benefits:
1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components).
2. Bootstrap has better checks for internal consistency. This caught several issues:
  - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias.
  - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works.
  - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work.
  - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`.
  - `install` was still using `src/librustc` instead of `compiler/rustc`.
  - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like.
@jyn514 jyn514 force-pushed the enforce-valid-paths branch from 0990851 to 0db70ca Compare April 16, 2022 18:13
@jyn514
Copy link
Member Author

jyn514 commented Apr 16, 2022

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Apr 16, 2022

📌 Commit 0db70ca has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 17, 2022
…Simulacrum

Require all paths passed to `ShouldRun::paths` to exist on disk

This has two benefits:
1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components).
2. Bootstrap has better checks for internal consistency. This caught several issues:
  - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias.
  - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works.
  - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work.
  - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`.
  - `install` was still using `src/librustc` instead of `compiler/rustc`.
  - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like.

Builds on rust-lang#95901 and should not be merged before.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 18, 2022
…Simulacrum

Require all paths passed to `ShouldRun::paths` to exist on disk

This has two benefits:
1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components).
2. Bootstrap has better checks for internal consistency. This caught several issues:
  - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias.
  - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works.
  - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work.
  - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`.
  - `install` was still using `src/librustc` instead of `compiler/rustc`.
  - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like.

Builds on rust-lang#95901 and should not be merged before.
@bors
Copy link
Contributor

bors commented Apr 18, 2022

⌛ Testing commit 0db70ca with merge 0516711...

@bors
Copy link
Contributor

bors commented Apr 18, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 0516711 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 18, 2022
@bors bors merged commit 0516711 into rust-lang:master Apr 18, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 18, 2022
@jyn514 jyn514 deleted the enforce-valid-paths branch April 18, 2022 18:38
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0516711): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 1 0 1
mean2 N/A N/A -1.0% N/A -1.0%
max N/A N/A -1.0% N/A -1.0%

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.
Warning ⚠: The following benchmark(s) failed to build:

  • rustc

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants