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

Break dependencies between syntax_ext and other crates #62771

Merged
merged 5 commits into from
Jul 28, 2019

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Jul 17, 2019

Move source_util macros into syntax_ext.
Move other early code generation facilities like standard library injection into syntax_ext.

The only crate that depends on syntax_ext now is rustc_interface which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of rustc_driver, many of them are no longer used after introduction of rustc_interface.

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 17, 2019
@eddyb
Copy link
Member

eddyb commented Jul 18, 2019

without either moving the whole proc macro server into libsyntax

IMO that's where it should go, I probably should've put it there myself.
Can we rename syntax_ext to rustc_builtin_macros or something?

Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

cc @Zoxc but LGTM

@eddyb
Copy link
Member

eddyb commented Jul 18, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Jul 18, 2019

📌 Commit 62863279eaa63d5d068f7b136d705ecd3147b33f has been approved by eddyb

@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 Jul 18, 2019
@petrochenkov
Copy link
Contributor Author

@bors r-
(I'll move the proc macro server.)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2019
@petrochenkov petrochenkov changed the title Break dependencies between syntax_ext and some other crates [WIP] Break dependencies between syntax_ext and some other crates Jul 18, 2019
@petrochenkov petrochenkov changed the title [WIP] Break dependencies between syntax_ext and some other crates Break dependencies between syntax_ext and other crates Jul 18, 2019
@petrochenkov
Copy link
Contributor Author

Updated.
syntax_ext is no longer tied to rustc_metadata (proc macro server is in libsyntax now) and more code is moved into syntax_ext.

@petrochenkov petrochenkov 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 Jul 18, 2019
Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

r=me

@petrochenkov
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Jul 18, 2019

📌 Commit 4e718ac1efd4fa2a76259f197eea4b145d176c58 has been approved by eddyb

@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 Jul 18, 2019
@bors
Copy link
Contributor

bors commented Jul 20, 2019

☔ The latest upstream changes (presumably #62705) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 20, 2019
@petrochenkov
Copy link
Contributor Author

@bors r=eddyb

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 26, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 26, 2019
Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb
@bors
Copy link
Contributor

bors commented Jul 26, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout depext (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self depext --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
warning: Cannot merge binary files: Cargo.lock (HEAD vs. heads/homu-tmp)
Auto-merging src/libsyntax_ext/test_harness.rs
Removing src/libsyntax_ext/test_case.rs
Auto-merging src/libsyntax_ext/standard_library_imports.rs
Auto-merging src/libsyntax_ext/source_util.rs
Removing src/libsyntax_ext/proc_macro_impl.rs
Auto-merging src/libsyntax_ext/proc_macro_harness.rs
Removing src/libsyntax_ext/deriving/custom.rs
Auto-merging src/libsyntax/parse/lexer/mod.rs
Auto-merging src/libsyntax/ext/proc_macro_server.rs
Removing src/libsyntax/ext/derive.rs
Auto-merging Cargo.lock
CONFLICT (content): Merge conflict in Cargo.lock
Automatic merge failed; fix conflicts and then commit the result.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 26, 2019
@bors
Copy link
Contributor

bors commented Jul 27, 2019

☔ The latest upstream changes (presumably #62086) made this pull request unmergeable. Please resolve the merge conflicts.

Move `source_uitil` macros into `syntax_ext`
Cleanup dependencies of `rustc_driver`
Few other minor renamings for consistency.
Remove one unused dependency from `rustc_passes`.
Fix libsyntax tests.
Fix rebase.
@petrochenkov
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Jul 27, 2019

📌 Commit b5a0e6e has been approved by eddyb

@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 Jul 27, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 27, 2019
Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb
Centril added a commit to Centril/rust that referenced this pull request Jul 27, 2019
Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb
Centril added a commit to Centril/rust that referenced this pull request Jul 28, 2019
Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb
bors added a commit that referenced this pull request Jul 28, 2019
Rollup of 8 pull requests

Successful merges:

 - #61207 (Allow lifetime elision in `Pin<&(mut) Self>`)
 - #62074 (squash of all commits for nth_back on ChunksMut)
 - #62771 (Break dependencies between `syntax_ext` and other crates)
 - #62883 (Refactoring use common code between option, result and accum)
 - #62949 (Re-enable assertions in PPC dist builder)
 - #62996 (tidy: Add a check for inline unit tests)
 - #63038 (Make more informative error on outer attribute after inner)
 - #63050 (ci: download awscli from our mirror)

Failed merges:

r? @ghost
@bors bors merged commit b5a0e6e into rust-lang:master Jul 28, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 7, 2019
Move injection of attributes from command line to `libsyntax_ext`

Just a tiny bit of code generation that wasn't moved into `libsyntax_ext` in rust-lang#62771.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants