Skip to content

Address the warning given by haxe 5.0.#55

Open
qlambert-pro wants to merge 1 commit into
deepnight:masterfrom
qlambert-pro:macro-display
Open

Address the warning given by haxe 5.0.#55
qlambert-pro wants to merge 1 commit into
deepnight:masterfrom
qlambert-pro:macro-display

Conversation

@qlambert-pro

@qlambert-pro qlambert-pro commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

I have been experimenting with the upstream version of haxe and ran into warnings this PR applies the suggestion given in the messages.

[WARNING] /usr/share/haxe/lib/deepnightlibs/git/src/dn/Tweenie.hx:381: characters 6-13

 381 |  #if display
     |      ^^^^^^^
     | (WIfDisplay) Using `display` here doesn't work because #if conditions are evaluated at parse time. In macros, use `haxe.macro.Context.defined("display")` instead.

[WARNING] /usr/share/haxe/lib/deepnightlibs/git/src/dn/Tweenie.hx:396: characters 6-13

 396 |  #if display
     |      ^^^^^^^
     | (WIfDisplay) Using `display` here doesn't work because #if conditions are evaluated at parse time. In macros, use `haxe.macro.Context.defined("display")` instead.
     
[WARNING] /usr/share/haxe/lib/deepnightlibs/git/src/dn/Cooldown.hx:94: characters 6-13

  94 |  #if display
     |      ^^^^^^^
     | (WIfDisplay) Using `display` here doesn't work because #if conditions are evaluated at parse time. In macros, use `haxe.macro.Context.defined("display")` instead.

@kLabz

kLabz commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

That's not how you should do it Oo (and it should actually give compilation errors)

Basically here the #if lines should be dropped.
haxe.macro.Context.defined("display") is for macro code, not #if conditions.

@qlambert-pro

qlambert-pro commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Is that what you meant?

i.e. only keep the macro definitions of the functions? I guess more importantly the ones with the actual implementation.

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