prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
2.4k stars 137 forks source link

Integration of pixi with vscode for C++ projects #1570

Open traversaro opened 1 week ago

traversaro commented 1 week ago

Problem description

It would be great for pixi ecosystem to have support to easily open in Visual Studio Code and have integration out of the box with pixi projects that build C++ code.

See:

jfchenier commented 1 week ago

I have seen this mentioned a few times on discord. But I think the best approach would be something similar to the micromamba vscode extension where the environment is loaded globally to the IDE. This gives all extensions access to the virtual environment.

In my opinion, this Is a must when you have multi-language project.

wolfv commented 1 week ago

I wonder if changing the VSCode CMake extension (for example) would be worth it - for example here: https://github.com/microsoft/vscode-cmake-tools/blob/7b621f45ca9ab4df486f9ea3bcc5439034cea7a9/src/paths.ts#L251

However, if all extensions would be aware of the "pixi"-PATH then the CMake extension should work OOTB.

traversaro commented 1 week ago

I am afraid that just setting the CMake path to the pixi's cmake is not enough. If the PATH is not modified to contain the environment executables or if CXX/CC env variables are not properly exported, CMake would not pick the pixi's compilers in place of the system ones.

sdebionne commented 6 days ago

I see that the vscode CMake extension has the concept of KitsController, similar to the locator of the python extension. Maybe that is the way to go?