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

CLI - how to integrate codegen properly? #78

Closed
tomhoule opened this issue Aug 7, 2018 · 4 comments
Closed

CLI - how to integrate codegen properly? #78

tomhoule opened this issue Aug 7, 2018 · 4 comments

Comments

@tomhoule
Copy link
Member

tomhoule commented Aug 7, 2018

https://docs.rs/syn/0.14.7/syn/#optional-features

Edit: To make the issue less confusing, the problem is that we use types from the proc_macro2 crate (TokenStream...) to do codegen, and that can't be linked statically. So codegen from the CLI may be tricky.

@djc
Copy link

djc commented Aug 22, 2018

Not exactly sure what you're planning here, but just as an FYI: in my understanding you're not allowed to link to proc_macro from a binary running outside of the Rust compiler. See djc/askama#73 and the linked issues for more information.

@tomhoule
Copy link
Member Author

It was just a note because I remember having trouble in another project that did code generation using the proc macro infrastructure (syn, quote, etc.). I will put a disclaimer on the CLI README because it's not the highest priority feature at the moment (apollo-cli works just fine as a replacement).

@tomhoule tomhoule changed the title CLI - link proc_macro statically CLI - how to integratio codegen properly? Aug 23, 2018
@tomhoule tomhoule changed the title CLI - how to integratio codegen properly? CLI - how to integrate codegen properly? Sep 1, 2018
@tomhoule
Copy link
Member Author

tomhoule commented Sep 4, 2018

Also see #43

@tomhoule
Copy link
Member Author

Addressed by #229 - also see the changelog.

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

No branches or pull requests

2 participants