openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Path for lime.projectFile in multi-root projects #105

Open 47rooks opened 5 months ago

47rooks commented 5 months ago

Currently lime.projectFile on Windows, at any rate, requires an absolute path when specified in a multi-root workspace .code-workspace file. It would be great if this could be made a path relative to the location of the .code-workspace file. That way you could version control this file:

47rooks commented 5 months ago

ok - the projectFile path is relative. The problem is that the lime extension spawns the run task in the lower level directory - the directory that contains the project.xml. So if you have this sort of structure:

composites
    examples
    tests
    composites.code-workspace

if you set lime.projectFile to "..\examples\Project.xml" then the plugin will correctly build.

player-03 commented 5 months ago

So is that good enough, or is there still some change you want to see?

47rooks commented 5 months ago

Actually not sure. It is a bit counter-intuitive to have to set this this way. It would make more sense for it to be relative to the code-workspace file location. Obviously this can be used - I am still playing with it and it's not broken yet. I guess it depends a bit on what the plot is for the lime-extension to support multi-root workspaces.

The main thing right now though is being able to switch to different Project.xml files in this structure. But that's really a different issue. I'll file one on that separately I guess because at the moment I have to manually edit the code-wrokspaces to be able to switch between tests and examples which both have Project.xmls.

joshtynjala commented 5 months ago

I guess it depends a bit on what the plot is for the lime-extension to support multi-root workspaces.

Unfortunately, we can't support multi-root workspaces until the Haxe extension does first. At least not without providing our own custom Haxe code intelligence.