jcward / vscode-haxe

Haxe language extension for Visual Studio Code
MIT License
64 stars 10 forks source link

vscode-project.hxml #26

Open MatthijsKamstra opened 8 years ago

MatthijsKamstra commented 8 years ago

Hi

I just updated VSCode Haxe plugin, and the new thing I encountered:

vscode-project.hxml

which looks very similar to the build.hxml you need for vscode to work.

a new thing or a bug?

pleclech commented 8 years ago

@MatthijsKamstra it 's an automated file generated file based on your build hxml, it will be deleted when you quit vscode, and it is updated when you edit you build hxml

It contains on other thing the temporary path that is used when you edit your .hx file

jcward commented 8 years ago

It only shows up when temp directory is enabled, right? Could we put it in the temp directory? Or does it need to be in the project dir?

nadako commented 8 years ago

Wouldn't it be easier to just parse the source hxml file and pass arguments from it directly to the compiler? I was doing that in my ST plugin prototype and it worked out quite well: https://github.com/nadako/hxsublime/blob/master/src/BuildHelper.hx

pleclech commented 8 years ago

@jcward Well it is generated where your build is, if you want to move it on other location you will have to fix the path(s), adding maybe a --cwd inside the generated one Le 10 avr. 2016 15:34, "Jeff Ward" notifications@github.com a écrit :

It only shows up when temp directory is enabled, right? Could we put it in the temp directory? Or does it need to be in the project dir?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jcward/vscode-haxe/issues/26#issuecomment-207985740

pleclech commented 8 years ago

@nadako I m working on similar thing for target selection, but looking around i see that you can have pretty imbricated build.hxml file with or without --next --each

And on other i prefer to have an internal generated file that maybe can be enhanced and used by the ide, who knows...

pleclech commented 8 years ago

There is also an option (not well tested) in the settings to use the tmp directory as your working directory : haxe.haxeUseTmpAsWorkingDirectory (false/true).

It is setted to false by default.

MatthijsKamstra commented 8 years ago

my 5cents It shouldn't be in the folder next to the build.hxml even if it's removed after you close VSCODE. Usually I commit my code before closing the editor, and now I have to gitignore vscode-project.hxml. Moving it to a temp folder (outside the project) sounds good

It only shows up when temp directory is enabled, right?

Not something I changed by my knowledge

pleclech commented 8 years ago

@MatthijsKamstra

Not something I changed by my knowledge

It is set now to auto by default, so if not overwritten in your settings it will try to use a tmp directory to avoid the saving problem of your .hx file each time you need completion.