-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
Compilation server cause minject to fail #4892
Comments
I can't even compile that, "src/Main.hx:10: characters 8-20 : minject.Injector has no field map". |
requires minject version 2,0,0-rc,1 |
Eh okay, why does haxelib not install that automatically? Anyway, I can reproduce the problem. |
i think haxelib ignores non-release versions? (i.e. " |
Is this a regression? |
Just tested with 3.2.1, same problem. This may or may not be about the compilation server keeping the static state of variables. I've set the milestone to 3.3 but I can't promise that I'll be looking into it for that. Maybe Nicolas can immediately tell us why this happens, otherwise someone is gonna have to dig into minject. |
minject 2.0 is largely macro-based. And from haxe manual:
Not sure what that means indeed. |
@Simn try to disable the macro context cache if you want to check if it's statics related. |
How does one do that? |
Check in typer.ml, we have a macro context ref. You need to reset it to None before starting a new fresh compilation in compilation server loop (which is in main.ml) |
I can't figure out how to do that, all I get are stack overflows and or lots of "Cached 0 modules" output. I'll set this to 3.4 because it's not a regression. |
This is frustrating, several ufront users has been trapped by this bug... |
I revisited this issue today, and I got:
on a second compilation (with compilation server). But there isn't a Edit: Hm... sorry for the confusion, this new error happens in another rather complex code base. The original reported behavior stayed the same. I will try to isolate it. |
Ok, I am building for js and this error comes from Edit: I believe this one is another issue. Opened a new issue at #5320 |
You may already know this, but this may serve for record purpose: If compile to js and diff the two outputs:
The meta with So by investigating minject's source code, I found that the I don't know what to do with this. Maybe the macro guy can give me some hints? @back2dos |
Well, turns out that this is trivial. Since this should be fixed in minject, I am closing it. |
When built with compilation server, injected variables become null.
Edit: the first build with compilation server may not fail, try modify the source and compile again
hxml:
The text was updated successfully, but these errors were encountered: