Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLet's consider going back to macros for stable #99
Comments
This comment has been minimized.
brendanzab
commented
Mar 12, 2016
|
The reliance on Syntex scares me, as somebody who wished to introduce Rust for one of our data analytics projects. I would have definitely been more confident if there were macro alternatives available, in lieu of the stabilization of syntax extensions :( |
This comment has been minimized.
I wouldn't call it reliance. Every single thing that we use syntax extensions for is completely reasonable to write by hand (which I often do when I don't want to use syntex, or can't use codegen). |
This comment has been minimized.
|
Putting this on the 0.7 milestone. I've been working on this for a few days now. Still need to audit a few more cases, but I'm fairly certain that every single one of our syntax extensions (with the exception of The overall plan is to add macros for each of our custom derive cases (all of our annotations are basically custom derive. The ones that aren't explicitly a I think it makes sense to keep the syntax extension form, but simply have them call the macro from the main Diesel crate. Aside from the "this eventually becomes stable" argument, we can also provide much better error messages from a procedural macro. For example, if I plan on opening a PR moving |
sgrif
added
breaking change
accepted
labels
Apr 23, 2016
sgrif
added this to the 0.7 milestone
Apr 23, 2016
added a commit
that referenced
this issue
Apr 24, 2016
added a commit
that referenced
this issue
Apr 24, 2016
sgrif
referenced this issue
Apr 24, 2016
Merged
Provide a syntax extension free alternative to `#[insertable_into]` #303
added a commit
that referenced
this issue
Apr 24, 2016
added a commit
that referenced
this issue
Apr 25, 2016
This comment has been minimized.
|
These have been implemented wherever possible. |
sgrif commentedJan 15, 2016
Syntex has proven to be pretty painful to track for supporting our compiler plugins on Stable. I think it's probably worth keeping support for, but we've been having issues with it causing released versions to break after the fact. I'd like to keep it as an option, but remove it by default in favor of our old "put your struct definition in these macros" solution as the "will definitely work on this version of Rust until the end of time" option.