Marwes / schemafy

Crate for generating rust types from a json schema
MIT License
242 stars 51 forks source link

Fix: All current and reserved keywords #21

Closed ryanpresciense closed 5 years ago

ryanpresciense commented 5 years ago

From https://doc.rust-lang.org/reference/keywords.html. I guess it could use a hash, but it's still a pretty small list

Marwes commented 5 years ago

Thanks! The build is failing due to an unrelated reason which isn't trivial to fix as the crate is. I did some changes to make this into a procedural macro with #22 which also fixed the test setup. If it is ok with you to use a procedural macro instead of a build script I can make a release with this and #22

ryanpresciense commented 5 years ago

The joys of nightly :) Have a little bit more to go into that, the keyword check should also lowercase

On Fri, 5 Jul 2019 at 21:53, Markus Westerlind notifications@github.com wrote:

Thanks! The build is failing due to an unrelated reason which isn't trivial to fix as the crate is. I did some changes to make this into a procedural macro with #22 https://github.com/Marwes/schemafy/pull/22 which also fixed the test setup. If it is ok with you to use a procedural macro instead of a build script I can make a release with this and #22 https://github.com/Marwes/schemafy/pull/22

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Marwes/schemafy/pull/21?email_source=notifications&email_token=AHIU5W3AYPWYLTOGYJC2WTDP56YFDA5CNFSM4H6MLBWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKJOPA#issuecomment-508860220, or mute the thread https://github.com/notifications/unsubscribe-auth/AHIU5W4YCTVBYWA3BRS2TADP56YFDANCNFSM4H6MLBWA .

-- NOTICE AND DISCLAIMER: This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Presciense Limited. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error and delete it from your system.

Marwes commented 5 years ago

I released 0.5 which includes this PR. As long as you use rustc >=1.31.1 you can use that with the procedural macro syntax which should be much simpler to use compared to the previous build script!