Skip to content

Replace syntex with rustc-ap-syntax #854

Merged
nrc merged 4 commits intoracer-rust:masterfrom
kngwyu:rustc-ap-syntax
May 18, 2018
Merged

Replace syntex with rustc-ap-syntax #854
nrc merged 4 commits intoracer-rust:masterfrom
kngwyu:rustc-ap-syntax

Conversation

@kngwyu
Copy link
Copy Markdown
Collaborator

@kngwyu kngwyu commented May 18, 2018

Now syntex_syntax is no longer maintained, so we have to move towards libsyntax.

Here I list up change from our current syntex_syntax 52.0 and rustc-ap-syntax 133.0 (though not all).

By this change, we become unable to compile racer with beta or stable compiler.
So we have to decide some things.

  • Should we change the package name like rustfmt-nightly?
  • Should we remain current master as syntex branch?

I constructed this PR from kngwyu#1 kngwyu#2 kngwyu@40466f6 and some commits.

kngwyu added 3 commits May 18, 2018 15:27
with support for `use_nested_groups`
By rust-lang/rust#49718, ExprKind::TupField
was removed. This commit includes a temorary fix and a tests for this
removal.
@kngwyu kngwyu requested review from TedDriggs and nrc May 18, 2018 06:51
@birkenfeld
Copy link
Copy Markdown
Collaborator

Why is nightly required?

@kngwyu
Copy link
Copy Markdown
Collaborator Author

kngwyu commented May 18, 2018

@birkenfeld
Because rustc's libsyntax uses many feature gates

@davemilter
Copy link
Copy Markdown

@kngwyu

Why rustc-ap-syntax and not https://github.com/dtolnay/syn ?

@kngwyu
Copy link
Copy Markdown
Collaborator Author

kngwyu commented May 18, 2018

@davemilter
For some reasons.

  • We currently use syntex-syntax i.e. older version of libsyntax. So to migrate over to rusc-ap-syntax i.e. latest version of libsyntax, is not so hard.
  • syn is designed for proc_macro

But, if you think there's any merit to use syn, please let me know.

@nrc
Copy link
Copy Markdown
Contributor

nrc commented May 18, 2018

syn does have some advantages - it works on stable and is itself more stable (changes less, so less bustage for clients). However, I think moving to syn will be a really big change and using rustc_ap_syntax is a great step for right now (in particular, rustfmt uses it, so at the least we have a couple of important tools relying on the same dependency).

@nrc nrc merged commit d465e38 into racer-rust:master May 18, 2018
@nrc
Copy link
Copy Markdown
Contributor

nrc commented May 18, 2018

Thanks, this is great!

@kngwyu kngwyu deleted the rustc-ap-syntax branch May 19, 2018 07:45
@kngwyu
Copy link
Copy Markdown
Collaborator Author

kngwyu commented May 19, 2018

I created syntex branch for just in case.
And, we have to update README before next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants