Open memsharded opened 2 years ago
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!
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 :)
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.
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!
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).
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.
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.
@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.
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 .
.
Ok, I wasn't precise enough. :)
I was talking about the one-click-to-build solution without using conan install
.
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 viaCMakeToolchain
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 :)
@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 https://github.com/conan-io/wishlist/issues/226#issuecomment-1107853636