Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode extension #11087

Open
memsharded opened this issue Apr 24, 2022 · 11 comments
Open

VSCode extension #11087

memsharded opened this issue Apr 24, 2022 · 11 comments
Labels
component: ux No changes to core business logic type: feature

Comments

@memsharded
Copy link
Member

Many developers are now on vs code and it's ruling IDE market according to stackoverflow survey 2019. I wish there would be conan extension for vs code.

https://insights.stackoverflow.com/survey/2019#technology-_-most-popular-development-environments

@KaungZawHtet, @jsgogo Maybe it's a bit late to reply this thread, but I created the conan extension for VS code, and just published it a couple days ago. Maybe you can check out my extension :) I hope it could be really helpful for the community :)
Here is the link to my extension https://github.com/afri-bit/vsconan

Originally posted by @afri-bit in conan-io/wishlist#226 (comment)

@memsharded
Copy link
Member Author

Hi @afri-bit

I am creating a new issue here in the main Conan repo, because the wishlist is mainly for packages, and is almost abandoned in favor of the main conan-center-index repo.

Indeed an extension for VScode is interesting, and we have been wanting to do something for it for a while. At the moment we are prioritizing getting 2.0 out, but after 2.0 we will resume work on IDE plugins and extensions. We will continue the conversation here when it is time, so thanks very much for doing this and sharing it!

@memsharded memsharded added type: feature component: ux No changes to core business logic labels Apr 24, 2022
@afri-bit
Copy link

Hi @memsharded,

thanks for creating a new issue for this topic.

Looking forward to Conan 2.0 :)
I hope the CLI API will not change so much at the end, so my extension can be reused, since it just uses CLI mainly for this purpose.

Other than that, always happy to help :)

@memsharded
Copy link
Member Author

I hope the CLI API will not change so much at the end, so my extension can be reused, since it just uses CLI mainly for this purpose.

Unfortunately it will change substantially, the Conan 1.X cli accumulated some bad UX, so it was time for a clean up. But conan install <path> -pr=myprofile remains, it depends on how many things you use. But don't worry now, we will figure it out when it comes.

@tbsuht
Copy link

tbsuht commented Mar 28, 2024

Indeed an extension for VScode is interesting, and we have been wanting to do something for it for a while.

Push. This would be great!

See also: #7374

@jcar87
Copy link
Contributor

jcar87 commented Mar 28, 2024

Indeed an extension for VScode is interesting, and we have been wanting to do something for it for a while.

Push. This would be great!

See also: #7374

Hi @tbsuht - in the meantime, if your project uses CMake and already has a conanfile (txt or py), you may want to look into https://github.com/conan-io/cmake-conan - Using VSCode's CMake tools extension, all you would need to do is edit the presets to define CMAKE_PROJECT_TOP_LEVEL_INCLUDES to point to [path-to-cmake-conan]/conan_provider.cmake - this can be persisted in CMakePresets.json or CMakeUserPresets.json at the root of your project. This should cause CMake to invoke Conan while it configures - negating the need to call Conan beforehand (although it has some limitations, please see that project's readme).

@tbsuht
Copy link

tbsuht commented Apr 2, 2024

Hi @jcar87

We're already using CMake-Conan and hitting the limitations there. In our case it's information from the cpp_info (builddirs) of an internal package made available via CMakeToolchain generator which can't be used when building.

Is there any plan for a plugin? Can't find something in the milestone section.

@memsharded
Copy link
Member Author

I think the experience with VSCode with the cmake-tools installed using presets is quite good. Yes, it requires doing conan install in the terminal, but the presets are automatically loaded and can be used from VSCode, so the effort is smaller than other IDEs.

At the moment a VSCode plugin is not planned.

@tbsuht
Copy link

tbsuht commented Apr 4, 2024

@memsharded Sure, the integration into VS Code is good. The problem is that the CMakeToolchain generator is not supported, to my knowledge. And this limitation is easily reachable imo, see the example above.

@memsharded
Copy link
Member Author

Sure, the integration into VS Code is good. The problem is that the CMakeToolchain generator is not supported, to my knowledge. And this limitation is easily reachable imo, see the example above.

Yes, the CMakeToolchain is supported, and it is the one that generates the presets and toolchain for the integration to work. I am referring to the flow using conan install . + VSCode cmake-tools integration opening the presets generated by Conan, this works quite well, with the CMakeToolchain. The only thing is that user should type conan install ..

@tbsuht
Copy link

tbsuht commented Apr 5, 2024

Ok, I wasn't precise enough. :)

I was talking about the one-click-to-build solution without using conan install.

@jcar87
Copy link
Contributor

jcar87 commented Apr 9, 2024

Hi @jcar87

We're already using CMake-Conan and hitting the limitations there. In our case it's information from the cpp_info (builddirs) of an internal package made available via CMakeToolchain generator which can't be used when building.

Is there any plan for a plugin? Can't find something in the milestone section.

Hi @tbsuht - if you could open an issue with more details in the cmake-conan repository we may be able to advise further, if anything so that we can have a better view of what is missing feature-wise :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ux No changes to core business logic type: feature
Projects
None yet
Development

No branches or pull requests

4 participants