Skip to content

Replace run_compiler with RunCompiler builder pattern - #77649

Merged
bors merged 1 commit into
rust-lang:masterfrom
lakshya-sky:replace_run_compiler
Oct 11, 2020
Merged

Replace run_compiler with RunCompiler builder pattern#77649
bors merged 1 commit into
rust-lang:masterfrom
lakshya-sky:replace_run_compiler

Conversation

@lakshya-sky

Copy link
Copy Markdown
Contributor

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

@rust-highfive

Copy link
Copy Markdown
Contributor

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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2020
@Xanewok

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

r? @bjorn3

@jyn514

Copy link
Copy Markdown
Member

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

@jyn514jyn514 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
@jyn514jyn514 changed the title Replace run compilerReplace run_compiler with RunCompiler builder patternOct 7, 2020

@bjorn3bjorn3 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

@bors delegate=bjorn3

@bors

bors commented Oct 7, 2020

Copy link
Copy Markdown
Collaborator

✌️ @bjorn3 can now approve this pull request

@jyn514jyn514 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
Copy Markdown
Member

@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

Comment threadsrc/tools/clippy/src/driver.rs Outdated
@lakshya-sky
lakshya-skyforce-pushed the replace_run_compiler branch 2 times, most recently from b488f70 to 43cde10CompareOctober 7, 2020 13:53
Comment threadsrc/tools/clippy/src/driver.rs Outdated
Comment threadsrc/tools/clippy/src/driver.rs Outdated

@bjorn3bjorn3 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e8dca78 has been approved by matthewjasper

@borsbors 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

bors commented Oct 11, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e8dca78 with merge 25d2d09...

@bors

bors commented Oct 11, 2020

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Oct 11, 2020
@bors
bors merged commit 25d2d09 into rust-lang:masterOct 11, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 11, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 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
Fixesrust-lang#77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
@Mark-SimulacrumMark-Simulacrum mentioned this pull request Nov 15, 2020
@Mark-SimulacrumMark-Simulacrum modified the milestones: 1.49.0, 1.48.0Nov 15, 2020
@Mark-SimulacrumMark-Simulacrum added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 15, 2020
@Mark-Simulacrum

Copy link
Copy Markdown
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegenArea: Code generationbeta-acceptedAccepted for backporting to the compiler in the beta channel.C-cleanupCategory: PRs that clean code up or issues documenting cleanup.merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@lakshya-sky@rust-highfive@Xanewok@jyn514@bors@matthewjasper@Mark-Simulacrum@bjorn3@rustbot