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

[std] disallow some haxe.macro.Context methods on non-macro eval #11996

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented Feb 11, 2025

Surprisingly (or not?), a good amount of Context methods are perfectly usable outside macro on eval target.

Maybe we'd want to deprecate the usage of some of these in favor of less hacky solutions (getMacroStack for example).

@Simn
Copy link
Member

Simn commented Feb 11, 2025

Yes, it would be nice to separate this better. We could have eval.Runtime with all the functions that work in both macro and eval contexts, and then keep only the macro-specific stuff in haxe.macro.Context.

@kLabz
Copy link
Contributor Author

kLabz commented Feb 11, 2025

The distinction is sometimes a bit blurry, like typing expressions etc. work fine on non-macro eval too.

But I do agree separating those and deprecating non-macro use of Context methods in Haxe 5.0 would be nice.

@skial skial mentioned this pull request Feb 11, 2025
1 task
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