snowkit / atom-haxe

atom.io haxe plugin, includes completion, error checking and more.
MIT License
43 stars 10 forks source link

Plugin dysfunctional when project.hxml uses "--next" #51

Open TheSHEEEP opened 8 years ago

TheSHEEEP commented 8 years ago

First of all, I am not sure if this is a functionality issue of this plugin or the requirement one "language-haxe", so please tell me if this is in the wrong place ;)

Most functions of the plugin (except building) are exceptionally slow or won't function at all when the project.hxml does multiple builds using "--next".

Now, I know that the underlying problem here might be the haxe executable itself, which causes problems with this. However, since this problem is known since forever and not fixed in haxe yet, I'd suggest a workaround in the plugin.

Would it be possible to not send the whole project.hxml to the executable for auto-completion, but instead something else, like the part before the first "--next" or something like it? I think that for most project that would yield correct results, anyway. And would definitely be preferrable to the current state (= not working at all).

It is really uncomfortable having to comment/uncomment stuff in the project.hxml all the time just to get autocompletion working ;)

mockey commented 8 years ago

I always use a bare bones build.hxml file with only the necessary lines for completion. For real building with --next, -cmd etc. I include it in another hxml, like.:

--next
build.hxml
-cmd ...
...
TheSHEEEP commented 8 years ago

That works?

What I do is similar, though. Instead of a next in the hxml used for completion, I do this in the file:

-cmd "haxe mainbuildfile.hxml"

It is not that much of a hassle, but yet another undocumented thing in Haxe (& tools) increasing entry barrier.

mockey commented 8 years ago

Yes, that works. hxml is quite flexible actually. But it's just not documented really, you're right about that. Here's an old blog post from @andyli with some good information: http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/ Maybe this could be added to the manual?

BTW: The build-plugin in atom is really useful.: https://atom.io/packages/build Are you using this already?