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

Added enabled attribute #8

Merged
merged 8 commits into from
Jul 8, 2024
Merged

Added enabled attribute #8

merged 8 commits into from
Jul 8, 2024

Conversation

Dherse
Copy link
Sponsor Contributor

@Dherse Dherse commented Jun 6, 2024

This adds an optional enabled attribute to control memoization conditionally.

Copy link
Member

@laurmaedje laurmaedje left a comment

Choose a reason for hiding this comment

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

Code looks good, my only complaint is that I'm not sure it's great that the macro will fully duplicate the function's body. Aside from the code duplication, this could include things like types and statics that resolve differently in the enabled and not enabled case.

macros/src/lib.rs Outdated Show resolved Hide resolved
macros/src/lib.rs Outdated Show resolved Hide resolved
@laurmaedje laurmaedje merged commit 972e300 into typst:main Jul 8, 2024
1 check passed
@laurmaedje
Copy link
Member

Thank you!

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.

2 participants