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

do not require importing bolero_generator or TypeGenerator in order to derive #109

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

Ekleog
Copy link
Contributor

@Ekleog Ekleog commented Jan 7, 2023

Fixes #105

This works with both imports from bolero::generator and bolero_generator, while before people had to imperatively import from bolero_generator and explicitly use TypeGenerator.

@Ekleog Ekleog force-pushed the no-require-import branch from 9f89151 to 2f8a238 Compare January 7, 2023 02:35
@@ -14,6 +14,7 @@ readme = "../bolero-generator/README.md"
proc-macro = true

[dependencies]
proc-macro-crate = "1.2"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at how this works; quite the hack! But I'm not sure how else to accomplish it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, unfortunately I think this won't be improved upon until there's a real story around proc-macro hygiene at least (or maybe more), and even that is already pretty far away :/

@camshaft camshaft merged commit 5c4f253 into camshaft:master Jan 9, 2023
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

Successfully merging this pull request may close these issues.

Deriving TypeGenerator requires that it is in scope
2 participants