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

Deprecate some API from haxe.macro.Compiler #11542

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions std/haxe/macro/Compiler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Compiler {
Removes a (static) field from a given class by name.
An error is thrown when `className` or `field` is invalid.
**/
public static function removeField(className:String, field:String, ?isStatic:Bool) {
@:deprecated("Will be removed in Haxe 5.0") public static function removeField(className:String, field:String, ?isStatic:Bool) {
if (!path.match(className))
throw "Invalid " + className;
if (!ident.match(field))
Expand All @@ -107,7 +107,7 @@ class Compiler {
Set the type of a (static) field at a given class by name.
An error is thrown when `className` or `field` is invalid.
**/
public static function setFieldType(className:String, field:String, type:String, ?isStatic:Bool) {
@:deprecated("Will be removed in Haxe 5.0") public static function setFieldType(className:String, field:String, type:String, ?isStatic:Bool) {
if (!path.match(className))
throw "Invalid " + className;
if (!ident.match((field.charAt(0) == "$") ? field.substr(1) : field))
Expand All @@ -127,7 +127,7 @@ class Compiler {
Add metadata to a (static) field or class by name.
An error is thrown when `className` or `field` is invalid.
**/
public static function addMetadata(meta:String, className:String, ?field:String, ?isStatic:Bool) {
@:deprecated("Will be removed in Haxe 5.0") public static function addMetadata(meta:String, className:String, ?field:String, ?isStatic:Bool) {
if (!path.match(className))
throw "Invalid " + className;
if (field != null && !ident.match(field))
Expand Down Expand Up @@ -373,7 +373,7 @@ class Compiler {
/**
Load a type patch file that can modify the field types within declared classes and enums.
**/
public static function patchTypes(file:String):Void {
@:deprecated("Will be removed in Haxe 5.0") public static function patchTypes(file:String):Void {
var file = Context.resolvePath(file);
var f = sys.io.File.read(file, true);
try {
Expand Down
Loading