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

proot-of-concept trace rework #9434

Closed
wants to merge 1 commit into from
Closed

Conversation

nadako
Copy link
Member

@nadako nadako commented May 17, 2020

I've accidentally stumbled upon one of my old branches and found it interesting :)

This is a proof-of-concept of how trace could be handled in a less hacky and more versatile way:

Instead of hard-coding trace and everything about it into the typer (and `trace as well), we provide a global static import from haxe.Trace.trace, where haxe.Trace is an extern class with the static trace method that takes Rest arguments.

Then, at the filters stage we rewrite calls to it into haxe.Log.trace calls so it behaves the same. But the cool part is that the user can provide their own haxe.Trace with their own implementation (could as well be a macro that generates something native or just a normal rest-arg method if/when we have #9274).

@Simn
Copy link
Member

Simn commented May 17, 2020

Last time I tried this I ran into the problem that a trace definition would have to support both rest arguments and the trailing haxe.PosInfos optional argument, which doesn't really fit together.

@skial skial mentioned this pull request May 18, 2020
1 task
@RealyUniqueName RealyUniqueName added this to the Backlog milestone May 18, 2020
@nadako nadako closed this May 24, 2020
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.

3 participants