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

Fix for haxe 3.3 macro execution order #93

Closed
wants to merge 2 commits into from
Closed

Fix for haxe 3.3 macro execution order #93

wants to merge 2 commits into from

Conversation

ntrf
Copy link

@ntrf ntrf commented Jun 7, 2016

Fixes #91 and luxeengine/alpha#383

Probably it's a haxe bug that Context.getType can't access other types during building, even if types aren't forming cyclic references. Instead i'm building type path to be defined directly, using simple string splitting. This avoids assertion failure, thrown by compiler otherwise. Also i'm using @:eager meta to force building types.

Another change is related to a new behaviour of switch expression: case values are no longer allowed to be writable variables. Even though it should not directly impact snow, it prevents mint from compiling with an error in keyboard translation code.

ntrf added 2 commits May 31, 2016 10:14
Haxe 3.3 does not allow plain variables to be used in case
statement anymore. Now it requires either `inline static` or
`default / never` property.
@ghost
Copy link

ghost commented Jun 28, 2016

C:\HaxeToolkit\haxe\lib\luxe\git\phoenix/Batcher.hx:149: lines 149-152 : Local variable `_current used without being initialized, perfect fix for me :)

@ntrf
Copy link
Author

ntrf commented Jun 28, 2016

This pull request fixes only snow, @CamperPR. There is another pull request for luxe, that fixed the problem you have.

@ghost
Copy link

ghost commented Jun 28, 2016

@ntrf, thanks for your answer

@ghost ghost mentioned this pull request Aug 11, 2016
@darmie
Copy link

darmie commented Sep 28, 2016

@ntrf I applied your PR, but I am getting this error

Main does not define type UserConfig

@ntrf
Copy link
Author

ntrf commented Sep 29, 2016

You need to have UserConfig type defined in your Main.hx module. See the sample: https://github.com/snowkit/snow/blob/master/samples/basic/src/Main.hx#L10. I'm not sure what version was first to introduce that, but it was before my PR.

@darmie
Copy link

darmie commented Sep 29, 2016

Thanks, I fixed it by downgrading Haxe from 3.3 to 3.2

On Thu, 29 Sep 2016, 08:09 Anton Nesterov, notifications@github.com wrote:

You need to have UserConfig type defined in your Main.hx module. See the
sample:
https://github.com/snowkit/snow/blob/master/samples/basic/src/Main.hx#L10.
I'm not sure what version was first to introduce that, but it was before my
PR.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#93 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAzwgof33AJf3m6hc9E6j8iLo0Y6oES7ks5qu2QsgaJpZM4IwKac
.

@ruby0x1 ruby0x1 closed this Feb 8, 2017
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