Remove some API from haxe.macro.Compiler #11540
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasons follow:
removeField and setFieldType
I don't know what this was used for, but I'd like to think that we've moved beyond doing string-based patching operations like that.
addMetadata
This has always had some sort of issues that I don't remember right now, but it was replaced by addGlobalMetadata for a reason. In fact, I've changed it here to use that, in a way that makes sense to me. The only difference should be that
isStatic
is now ignored.patchTypes
To my knowledge, this is ancient legacy from making flash externs. I don't think anyone even remembers the format this uses.
includeFileAccording to my investigations and #6252, the position argument never worked properly. The lua generator only checked for "top", which means that "closure" would silently be ignored. Genjs does check both, so there's a chance that somebody was actually using the latter somehow and we're breaking this now. That's a risk I'm willing to take. I can't see how "inline" ever did anything because it only makes sense from a macro call, and that's the part that never worked in the first place.Edit: One thing that maybe worked was using"inline"
directly instead ofIncludePosition.Inline
... So I guess maybe this was used after all. I'll still try to remove it because I'd like to discourage puttingjs.Syntax.plainCode
things in code.Edit: Never mind, too controversial.
Will leave this open for a bit and see if somebody complains too loudly.