vscode-abl / vscode-abl

MIT License
21 stars 2 forks source link

Issues with multiple projects in workspace #157

Open LievenDeFoor opened 2 weeks ago

LievenDeFoor commented 2 weeks ago

Hi Gilles,

We're having troubles getting our large workspace with multiple projects working in vscode. Our directory structure is as follows:

workspace
    project1
        openedge-project.json
        ...
    project2
        openedge-project.json
        ...

Project1 is a simple, standalone project and has no external dependencies. If I open project1 folder as workspace (using "Open Folder" in vscode) than that projects Intellisense seems to work as expected.

Project2 has a source dependency on project1, and we have added the following in project2's openedge-project.json file:

...
"buildPath": [
    { "type": "source", "path": "../project1" },
    ...

Notice the "..", to go one level up from the current project directory. Question1: is ".." supported?

When I open the "workspace" folder using "Open Folder", to have both projects open and in scope, then I seem to lose all useful Intellisense options. In best case we get presented some of the internal class methods/properties, but types that are supposed to be in scope by the "buildPath" setting from the openedge-project.json file are not presented.

We could consider creating a pl file from project1, and use that as "propath" entry in "buildPath" of project2 instead of the sources, but that's a quite limiting if you're developing in both projects at the same time. How is the plugin handling multiple open projects at the same time? Should it present options in Intellisense from all open projects?

Thanks, Lieven

gquerret commented 2 weeks ago

buildPath entries with type="source" can only reference subdirectories of the current project. In your case, the buildPath entry of project2 should point to the build directory of project1, with type="propath":

"buildPath": [
    { "type": "propath", "path": "../project1/target/build" },
    ...