-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
move compiler plugins to proc macro #156
Comments
Indeed! Landed in rust-lang/rust@375cbd2, it seems. While I'm very excited about your eagerness to contribute, I believe it's a bit early to make this transition. The Nonetheless, I think it's more than prudent to begin exploring migrating Rocket to the new feature. If there are bumps along the way, or things that simply cannot be done with the new API, I'm sure the Rust team would love to be made aware. |
After consideration, I decided to make it a separate library that coexists with rocket_codegen. Benefits are that user can decide which library to use and fallback to the much "stable" rocket_codegen if they seek for no breaking change and since the codegen part is the biggest obstacle of migrating rocket to stable Rust, a proc_macro library after proc_macro_attribute landed in stable rust can drive rocket a big leap toward stable rust. |
Please don't do this. Don't release a library as an alternative to I absolutely encourage you to experiment, and even submit a PR if things come along far enough, but please don't release something that can lead to confusion. There's absolutely no advantage; |
Ah ok, after the library is complete, a PR will be there, no splittism.
On Sun, 29 Jan 2017 at 1:27 PM Sergio Benitez ***@***.***> wrote:
Please don't do this. Don't release a library as an alternative to
rocket_codegen. This will simply confuse users. rocket_codegen is not
static, and neither is rocket. Both are changing often. Features are
being added/changed to/in codegen often; any differences between codegen
and your library will result in confusion at best and breakage at worst.
Further, the interface between core and codegen is not visible to users,
and likely will never be, so your library can break without notice,
breaking user's applications.
I absolutely encourage you to experiment, and even submit a PR if things
come along far enough, but please don't release something that can lead to
confusion. There's absolutely no advantage; custom_derive will be around
for the foreseeable future, and when proc_macro_attribute matures a bit,
Rocket will wholeheartedly migrate to it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#156 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA88zohcpOa_216702sAu_m4hz-gycUQks5rXCNNgaJpZM4Lwc9O>
.
--
Young Wu
*Data Scientist*
Data Team, Strikingly
a: 248 Daxue Road, Yangpu District, Shanghai
w: wooya.me e: doomsplayer@gmail.com
<https://cn.linkedin.com/in/wooya>
|
I've just implement almost all the things including derive, route and error catcher but not |
Closing this issue for now. We certainly want to move in this direction, but error reporting from |
Yes, since rocket has detailed error reporting after this issue initiated, I think it is not possible to close this issue in the near future. |
Now that
proc_macto_attribute
has landed, it would be nicer to migrate from old compiler plugin based codegen to theproc_macro
.I'm working on an attempt on my fork using pure
proc_macro
,syn
andquote
.It's just a notice in case of duplicated work from someone else.
The text was updated successfully, but these errors were encountered: