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

✨ Replace generated inner attrs with outer attrs. #144

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

LouisGariepy
Copy link
Member

@LouisGariepy LouisGariepy commented Aug 28, 2022

This is mostly a temporary measure until rust-lang/rfcs#752 gets resolved. The gist is that files containing inner attributes don't work with include_str which some of users need as part of their workflow.

The fix applied here is simple: instead of applying to inner attributes to the whole file, we apply outer attributes to the two top-level generated modules: queries and types. This introduces 4 duplicated lines, so not really a big deal 😄.

Closes #138.

@LouisGariepy LouisGariepy added the bug Something isn't working label Aug 28, 2022
@LouisGariepy LouisGariepy merged commit 0b8dad3 into main Aug 28, 2022
@LouisGariepy LouisGariepy deleted the convert_codegen_inner_attrs_to_outer branch November 1, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: an inner attribute is not permitted in this context
1 participant