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

Replace run_compiler with RunCompiler builder pattern #77649

Merged
merged 1 commit into from
Oct 11, 2020

Conversation

lakshya-sky
Copy link
Contributor

Fixes #77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthewjasper (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2020
@Xanewok
Copy link
Member

Xanewok commented Oct 7, 2020

It seems you're adding target/rls directory - this is the build artifact/cache directory created when running RLS locally. Please don't include that in the PR, thanks 🙂

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

r? @bjorn3

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

@dash2507 for help with git, take a look at https://rustc-dev-guide.rust-lang.org/git.html

@jyn514 jyn514 added A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 7, 2020
@jyn514 jyn514 changed the title Replace run compiler Replace run_compiler with RunCompiler builder pattern Oct 7, 2020
Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

LGTM after removing the compiler/rustc_driver/target dir. I don't have bors permission though.

@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

@bors delegate=bjorn3

@bors
Copy link
Contributor

bors commented Oct 7, 2020

✌️ @bjorn3 can now approve this pull request

@jyn514 jyn514 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 Oct 7, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 7, 2020

@dash2507 do you mind squashing the git history so rust doesn't have thousands of build files in the git history? It will make the repo even slower to download for everyone.

https://rustc-dev-guide.rust-lang.org/git.html#advanced-rebasing

@lakshya-sky lakshya-sky force-pushed the replace_run_compiler branch 2 times, most recently from b488f70 to 43cde10 Compare October 7, 2020 13:53
Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

You may want to edit the commit message to be more descriptive. For example you could use just the PR title. Looking at https://forge.rust-lang.org/index.html it seems that the no tool breakage week has ended yesterday.

RunCompiler::new takes non-optional params, and optional
params can be set using set_*field_name* method.
finally `run` will forward all fields to `run_compiler`.
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 10, 2020

📌 Commit e8dca78 has been approved by matthewjasper

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 10, 2020
@bors
Copy link
Contributor

bors commented Oct 11, 2020

⌛ Testing commit e8dca78 with merge 25d2d09...

@bors
Copy link
Contributor

bors commented Oct 11, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: matthewjasper
Pushing 25d2d09 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 11, 2020
@bors bors merged commit 25d2d09 into rust-lang:master Oct 11, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 11, 2020
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #77649!

Tested on commit 25d2d09.
Direct link to PR: #77649

💔 miri on windows: test-fail → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-fail → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Oct 11, 2020
Tested on commit rust-lang/rust@25d2d09.
Direct link to PR: <rust-lang/rust#77649>

💔 miri on windows: test-fail → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-fail → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 24, 2020
…hewjasper

Replace run_compiler with RunCompiler builder pattern

Fixes rust-lang#77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
@Mark-Simulacrum Mark-Simulacrum mentioned this pull request Nov 15, 2020
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.49.0, 1.48.0 Nov 15, 2020
@Mark-Simulacrum Mark-Simulacrum added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 15, 2020
@Mark-Simulacrum
Copy link
Member

This was backported into 1.48 (approved by me) in #79075 as a dependency of #78775.

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2020
…ulacrum

[beta] next

This backports:

* Avoid installing external LLVM dylibs rust-lang#78986
* Install CI llvm into the library directory rust-lang#79074
* Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case"" rust-lang#78784
* Bump Rustfmt and RLS rust-lang#78775
* Enforce no-move rule of ReentrantMutex using Pin and fix UB in stdio rust-lang#77801

For RLS/rustfmt compilation to succeed:
* change the order of type arguments on ControlFlow rust-lang#76614
* Add ControlFlow::is_{break,continue} methods rust-lang#78200
* Replace run_compiler with RunCompiler builder pattern rust-lang#77649

As a dependency of rust-lang#77801:
*  Add Pin::static_ref, static_mut. rust-lang#77726
Xanewok added a commit to Xanewok/rust-semverver that referenced this pull request Nov 18, 2020
Xanewok added a commit to Xanewok/rust-semverver that referenced this pull request Nov 18, 2020
Xanewok added a commit to Xanewok/rust-semverver that referenced this pull request Nov 19, 2020
Xanewok added a commit to Xanewok/rust-semverver that referenced this pull request Nov 19, 2020
Xanewok added a commit to Xanewok/rust-semverver that referenced this pull request Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation beta-accepted Accepted for backporting to the compiler in the beta channel. C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a RunCompiler builder to replace the run_compiler function
9 participants