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

Allow using *_property helper macros without importing FieldValue #229

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

ginger51011
Copy link
Contributor

@ginger51011 ginger51011 commented Mar 31, 2023

Fixes #203

Before, the macro would not compile without use ...::FieldValue in the same scope. This uses the special $crate metavariable to fix this.

Haven't tested this properly, do we have anywhere nice to put the tests?

Before, the macro would not compile without `use ...::FieldValue`
in the same scope. This uses the special `$crate` metavariable to fix
this.
@obi1kenobi
Copy link
Owner

Very nice!

Perhaps add an integration test to the trustfall crate? Integration tests (tests/ directory instead of src/) compile as separate crates so it's a good place to make sure that $crate does what we'd expect even when the macro is re-exported.

@ginger51011
Copy link
Contributor Author

Alright, so I decided to import nothing to make it easier to ensure FieldValue was not imported, which does make the code utterly outrageous to look at. What do you think?

Self::Vertex,
trustfall::provider::VertexIterator<'static, Self::Vertex>,
> {
todo!("schema should not contain neighbors: Berit likes it that way")
Copy link
Owner

Choose a reason for hiding this comment

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

haha who is Berit? 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extremely specific south Swedish internet sensation 😃

Copy link
Owner

Choose a reason for hiding this comment

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

Amazing!

@obi1kenobi obi1kenobi merged commit 4c5a398 into obi1kenobi:main Mar 31, 2023
@obi1kenobi
Copy link
Owner

Thanks for the fix! ❤️

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.

accessor_property and field_property macros should use absolute paths
2 participants