-
Notifications
You must be signed in to change notification settings - Fork 29
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
cannot parse modern rust due to reliance of syntex_syntax #70
Comments
Sadly no, this is also part of #23 . Basically syntex was deprecated, but no replacement was provided.
For the use cases in libstd, |
@ehuss i've forked syntex_syntax, and added support for repr(packed(N)) and repr(transparent) to it . If there is something from modern Rust missing there that you need, feel free to open a PR to my syntex fork. |
So I'm closing this issue as well, since there is nothing I can do here. I don't know why those involved decided to deprecate syntex_syntax without providing a replacement, and I can't take the workload of re-releasing libsyntax on crates.io . I do maintain a fork of the old syntex crate (syntex_syntax2 on crates.io) where I have hacked in support for some new language constructs used on FFI (repr(packed), repr(transparent), etc.) and that "works for me". If something should be hacked in there, you can open an issue in https://github.com/gnzlbg/syntex or even better, send a PR with a hack. It is completely unsupported and use at your own risk: there is no CI, no tests are run, and as long as everything continues to work in the rust-lang/libc repo which uses the fork, I don't mind modifying the library further if "it works for you". cc @dtolnay @Centril who might know more about what happen with the syntex crates and what the plan was for crates that were using it to migrate to something else. |
I no longer needed it for Serde so it didn't make sense to keep putting in time keeping up with rustc. Someone who wants that functionality should feel free to maintain a fork, but note that it's a lot of work. Almost everything that used it was able to switch to either syn or rustc-ap-syntax. |
Maybe we could switch to rustc-ap-syntax, it appears that it currently doesn't build, but i'm re-opening this until someone evaluates how easy / hard would it be to migrate to that (if possible at all). |
I've done some experiments trying to use the
At this point I was compiling half of rustc in a rather unsupported way, leading to errors such as:
This could be 'solved' this by setting In between the time syntex was written and now the internal API of the compiler has changed quite a bit; some effort would be needed to adapt ctest to the current API in the rustc crates. Although I believe it is theoretically possible to get this to work, it would make ctest incredibly fragile, because every time the internal rustc API changes, it will fail to build. Also, I'm pretty sure rustc cannot be built with a stable rustc because it uses feature flags, meaning it would need nightly compilers which change every day. I remember when clippy wasn't a part of rustup and had the same problem, which wasn't fun. I also had to use an old nightly (nightly-2021-07-07) because those |
gnzlbg/ctest#70 ctest2 is not perfect (see JohnTitor/ctest2#6 and other issues), but it is better than nothing and works for now.
gnzlbg/ctest#70 ctest2 is not perfect (see JohnTitor/ctest2#6 and other issues), but it is better than nothing and works for now.
Since ctest is using a ~2 year old version of libsyntax, it cannot handle any language changes since then. Are there any plans or ideas on how to move forward? I noticed you looking at this at dtolnay/syn#588, but I was wondering if you've found anything since.
The text was updated successfully, but these errors were encountered: