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 syntex with rustc-ap-syntax #854

Merged
merged 4 commits into from
May 18, 2018
Merged

Conversation

kngwyu
Copy link
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.

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 nrc and TedDriggs May 18, 2018 06:51
@birkenfeld
Copy link
Collaborator

Why is nightly required?

@kngwyu
Copy link
Collaborator Author

kngwyu commented May 18, 2018

@birkenfeld
Because rustc's libsyntax uses many feature gates

@davemilter
Copy link

@kngwyu

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

@kngwyu
Copy link
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
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
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
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