fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
823 stars 220 forks source link

Haxe Completion #1064

Open ncannasse opened 8 years ago

ncannasse commented 8 years ago

FYI I noticed today that adding -D display-details was not correctly handled in Haxe compiler, which was triggering a full recompilation when using the compiler cache. I have fixed it on Haxe GIT https://github.com/HaxeFoundation/haxe/commit/22633b6f0649fb870347f372c7931fc6962ce9dc but it might be better if you could always add -D display-details when compiling and asking completion, so there is no mismatch of configuration between the two. It seems the order of defines did also matters, which I have fixed as well.

elsassph commented 8 years ago

You're talking about the compiler server right?

Gee that may be tricky as there are many situations to handle:

Only the first case can be handled correctly, others will be difficult to solve.

ncannasse commented 8 years ago

Yes, it's completion server related.

I think the only thing you need to do is to have --each -D display-details for each compilation/completion, instead of simply adding -D display-details for completion.

The other completion-specific parameter (-D use_rtti_doc) is alrady ignored in Haxe 3.x

elsassph commented 8 years ago

--each -D display-details --next ...?

ncannasse commented 8 years ago

yes. Also, it seems you're using --each debug as well, so you need to group them together or else the second each will reset flags

elsassph commented 8 years ago

And if you have your own --each in your additional compiler options?

ncannasse commented 8 years ago

Then we need for fix that in haxe compiler. I guess we could change so they get added together instead of reset. Pinging @Simn on the issue

Simn commented 8 years ago

I can change it but I'm not sure if there might be problems due to duplicate command line arguments in some cases.