mesonbuild / vscode-meson

Meson for VisualStudio Code
Apache License 2.0
108 stars 50 forks source link

Can only detect one project per workspace #28

Open Denzo77 opened 3 years ago

Denzo77 commented 3 years ago

I have a workspace with my main app and a couple of libraries that are being developed in parallel as subprojects. Unfortunately the extension is only detecting a single project, and in this case it's one of the libraries and not the main app, which is inconvenient as that's the part which changes the most.

Would it be possible to support multiple meson projects in the same instance, or at least provide a way of switching the current project?

Ongy commented 2 years ago

Are you using meson subprojects to manage your projects, or do you have multiple toplevel projects in directories next to each other in your workspace?

ChristophHaag commented 2 years ago

I have multiple top level projects and see only one of the projects in the meson tab. Sure I can build my project outside of the IDE with ninja but I always thought an IDE should help with project management.

The meson actions in the ctrl+shift+p only suggest that one project too. There is an action "Focus on Current project View" which I guess can only focus on the single project that it shows anyway.

Ongy commented 2 years ago

Yes, the plugin currenlty only supports one project. We need to make a lot of internal code be less global to support more than one.

The first step is likely to support multiple workspace folders, though only one project in them. then multiple projects per workspace folder. Then multiple configurations (builddirs) per project.

The heaviest lifting part is probably the first (and a bit the last for design choice reasons). I mainly wanted to know if there's something that should be done to support meson subprojects better as well.