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

injection failing using compilation server #53

Open
postite opened this issue Feb 12, 2016 · 12 comments
Open

injection failing using compilation server #53

postite opened this issue Feb 12, 2016 · 12 comments

Comments

@postite
Copy link

postite commented Feb 12, 2016

minimalistic example failing with compilation server. works good without

https://gist.github.com/postite/2059bc4600f8115a8469

bug or what ?

@kevinresol
Copy link
Collaborator

What is the error?

@postite
Copy link
Author

postite commented Feb 20, 2016

hello @kevinresol .
no explicit error . but injected string will be null . ( only with compilation server ) .

@kevinresol
Copy link
Collaborator

Hm, maybe a minject bug?

@kevinresol
Copy link
Collaborator

Can you reduce it to a minimal example and see if it is minject or ufront problem

@postite
Copy link
Author

postite commented Feb 29, 2016

sorry for the late reply.
my gist is already a very minimalistic ufront-setup i really don't know what to remove from here .

@postite
Copy link
Author

postite commented Feb 29, 2016

btw i've just tried minject alone with compilation server and it works fine. so it's definitely a ufront bug we got here.

@postite
Copy link
Author

postite commented Feb 29, 2016

fyi first two compilations work fine but then ... compilation runs ok but injected variable is null

@kevinresol
Copy link
Collaborator

This should be haxe-related.
Let's track it at HaxeFoundation/haxe#4892

@postite
Copy link
Author

postite commented Mar 3, 2016

ok i've seen this! let the masters do their macro compiler Magic :)

@kevinresol
Copy link
Collaborator

@postite could you report your haxe version on that thread too?

Edit: I think Simn has figured out already. So no worry.

@kevinresol
Copy link
Collaborator

It turns out that it is not haxe's problem but minject's was coded in a way that is not compatible with the compilation server. I have pushed a fix to here.

That works, but it is not optimal. Because it uses onGenerate to modify the meta and onGenerate loops through all types, even they are already cached by the compilation server. Therefore I have changed onGenerate to use tink_syntaxhub (here), which will make it only process uncached types.

I will keep this open until the fix got merged into upstream minject

@jasononeil
Copy link
Contributor

Thanks for looking into this @kevinresol. Let's see if the team at Massive Interactive are happy to merge. Hopefully!

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

No branches or pull requests

3 participants