-
Notifications
You must be signed in to change notification settings - Fork 252
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
[question] Why is this project on hold until after the 2.0 release? #447
Comments
According to my observation, there are some other problems that cause cmake-conan "imcompatiable" with Conan 2.0. For example, However, the biggest problem for now is the "Chicken-And-Egg (CAE)" problem, isn't it? If so, does that mean Conan Official will put more efforts on supporting and maintaining cmake-conan if someone found or proposed a method or usage that can solve this CAE problem? After all, it seems that those other problems are not so hard to fix (just need to take some time) compared with the CAE problem. |
The main problem is:
|
@memsharded Thanks for your reply! And let me check whether I fully understand what you listed:
Am I correct? And if someone can propose a METHOD that can properly tackle all these problems, will Conan Official RECONSIDER the cmake-conan? |
Yes, sure, let us know your ideas about this. Just in case, have a look to the repo and previous issues, for example we have considered using the initial cache conan-io/conan#12034, and it didn't move forward. |
In short, my idea is to "rewrap the APIs of cmake-conan into a toolchain file",
And then, everything will be done automatically. I've already created a prototype. And I'm still writing the documentation and doing some tests with different compilers and cmake-level generators. So it might take a while. In terms of the usage, do you think it is simple enough? (Suppose that it satisfies all the other conditions) |
Not fully clear yet, so the Does this work for CMAKE_PROJECT_INCLUDE_BEFORE? My understanding is that this inclusion happens after the processing of the toolchain file happens, which might be a limitation? |
I will explain the detailed mechanism when proposing the whole project. (please wait for a while) I guarantee that it can work successfully. The following is the output log of using MSVC compilers: Click to expandF:\Git-Repo\cmake-project-template-conan>vcvarsall x64
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.19
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
F:\Git-Repo\cmake-project-template-conan>cmake --preset win32-msvc-x64-ninja-multi
Preset CMake variables:
CMAKE_CONAN_ERROR_QUIET:BOOL="TRUE"
CMAKE_CONAN_OUTPUT_QUIET:BOOL="TRUE"
CMAKE_CONFIGURATION_TYPES="Debug;Release"
CMAKE_CXX_COMPILER="cl.exe"
CMAKE_C_COMPILER="cl.exe"
CMAKE_INSTALL_PREFIX:PATH="F:/Git-Repo/cmake-project-template-conan/install/win32-msvc-x64-ninja-multi"
CMAKE_PROJECT_INCLUDE_BEFORE="F:/Git-Repo/cmake-project-template-conan/cmake/conan-setup.cmake"
-- Using Conan toolchain: F:/Git-Repo/cmake-project-template-conan/build/win32-msvc-x64-ninja-multi/conan-dependencies/conan_toolchain.cmake
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
========== cmake-project-template-conan ==========
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Target declared 'asio::asio'
-- Conan: Target declared 'CLI11::CLI11'
-- Conan: Component target declared 'Eigen3::Eigen'
-- Conan: Component target declared 'libpqxx::pqxx'
-- Conan: Component target declared 'libpq::pgcommon'
-- Conan: Component target declared 'libpq::pgport'
-- Conan: Component target declared 'libpq::pq'
-- Conan: Target declared 'PostgreSQL::PostgreSQL'
-- Conan: Component target declared 'CURL::libcurl'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from 'D:/.conan/short/d461c0/1/lib/cmake/conan-official-openssl-variables.cmake'
-- Conan: Target declared 'ZLIB::ZLIB'
-- Configuring done
-- Generating done
-- Build files have been written to: F:/Git-Repo/cmake-project-template-conan/build/win32-msvc-x64-ninja-multi As we can see in the above log message, there are For now, I just want to confirm whether the usage method of my idea is simple enough?
|
If this gonna be the ONLY way in 2.0 to consume Conan packages, I see it a rather show stopper. For non-opensource project at work I don't care about "transparency", and since my usages is mainly via QtCreator IDE, keeping convenience of use (that QtCreator + cmake-conan provides) has rather high priority. For example, if I use
Now, if on Conan 2.0 toolchain generator will be the only way, I will have to make helper scripts like Though maybe I am missing something and over-reacting? I believe there was some work in QtCreator, Qt itself to make it work better with Conan. @memsharded are you aware of any of that? |
In my practice, I only use Besides, almost all the modern C++ IDEs like CLion, VS 2022, Android Studio, have built-in CMake support, which makes it very inconvenient to manually call Another inconvenience is submodule. When a project is consumed as a submodule and |
I don't really understand how I will be able to use conan without being able to call it multiple times during CMake generation. In my workflow input for conan is generated dynamically based on what libraries from project have been enabled (there are more than 600 targets). Also some options might be changed dynamically based on CMake variables. All this logic is hidden under many layers of CMake. And it becomes even more complex with more added layers on top of this project that also allow to choose what part should be enabled. |
I've published the whole project. Please take a look: |
Gosh, I wish Conan considered workplace politics when making these design decisions. I don't care about "transparency", I can edit CMakeLists.txt all I want. Getting access to update a build to add some arbitrary shell command because a random dependency demands it? Imagine spending all your energy and reputation selling a bunch of curmugeony gray beards who have been dumping library sources in VS projects for years because it "just works", to use cmake + conan. "It will make maintenance easier". Then imagine going to each team a few months later, one by one, and telling them that not only there's a breaking change in your newfangled tool, but they need to touch their fragile spit-and-chicken-wire build system setups because of it. |
Execuse me. So what aspects or mechanism of Conan are you talking about? |
He stated that cmake-conan is a very important feature for convincing others to integrate conan. |
Agree 100%. |
Then, what do you think about the integration of Vcpkg with CMake? I'm not sure whether the situation you mentioned will happen or not, but at least this idea is the best for now as far as I know. And I think this is one of reasons why Vcpkg is more widespread than Conan. The usage is SIMPLE enough. (BTW, also NONINTRUSIVE) |
No offense. I'm not saying that Conan is worse than Vcpkg. In fact in my opinion, Conan is POTENTIALLY MORE POWERFULL than Vcpkg if all the features it proposed can be fullfiled and more 3rd party libraries can be supported.
This is why I tend to put more efforts on Conan. I'm just saying that in terms of Integration with CMake, Vcpkg is doing better than Conan for now. Actually, my cmake-conan-setup project is inspired by Vcpkg at the beginning. (microsoft/vcpkg#24956) |
Ok, thanks very much for the feedback @hwhsu1231, sure no offense, it is just that we are right now absolutely swamped, and it is just too difficult to keep up with everything, and it can be super stressing for us too. We understand there are a few issues that can be generating frustration to users and we are trying our best to address them, but it will take some time, there is simply too much on the backlog, and the migration to 2.0 is a critical priority because the whole situation is very confusing for users at the moment. We will certainly keep prioritizing the integration with CMake, so far the priority was to remove the intrusive integration that previous approaches did, and we did achieve a fully transparent integration via CMakeDeps and CMakeToolchain (transparent in the sense of not requiring modifications to the CMakeLists.txt, that was the most requested thing by users by far), but of course we will also continue working to try to provide something that also takes care of the caller side. It will just require some time, thanks very much for your patience and understanding. |
I only tried vcpkg in 2019 for a month and I am not sure if it has self-host package server like vcpkg does have self-hosted package server |
I don't know because I haven't tried it yet. What I'm saying is that "Vcpkg already provides a toolchain file for integration with CMake". And there is a concept called Manifest Mode, in which we just needs to do the following two things:
And then, all the installation of dependencies will be done automatically when we configure our CMake project. As we can see, we don't have to manually run
Most importantly, I think the integration with CMake should make users manually operate Conan Configurations as less as possible so that users can focus on CMake operations. Ideally, they just need to worry about what libraries their projects depend on and write them down in the Recipe File. |
Like to add another perspective : I'm using https://github.com/ObKo/stm32-cmake to build SMT32 code using CMake.
I don't see how i can get CMakeToolchain to do what I need and I do not expect Conan to cater to my (Probably doing it wrong) workflow. All I ask is that we do not remove the current cmake_find_package, cmake_paths generators. |
@marcus-free you have two questions I guess?
Edit: |
@jusito After you questions I have been iterating on my use case I have realized several things.
stm32-cmake uses CONAN_STM32-CUBE-G0 to define a set of CMake Interface Libraries, I'm unsure if it's a good idea to precompile them as this is an MCU use case and we need to give the compiler as much freedom as possible to optimize. (may be wrong about this)
Please ignore my "perspective" I was doing it wrong. |
The glory about CMake is there's more ways to do the same thing than they are atoms in the universe. We have tried to use the "modern" way that Kitware and the ecosystem have proscribed. In 2020 that was targets and toolchains. So you aren't wrong just different and thanks Okay ❤️ I am glad to hear you are having some success with the new generators |
Sorry for more of topic but the design Conan 2.0 is a beautiful thing!
and
Gives me a CMakeLists.txt that have no idea that Conan exists. And the conanfile.py if short and sweet! It's a beautiful thing! Thanks for your hard work! |
Congratulations!!! Just now, Conan 2.0 is officially released. Will the Conan team start to re-evaluate this project and keep maintaining it? I really think that Conan should provide at least 1 integration in which CMake is the "starting point". I suggest that Conan take Vcpkg's Manifest Mode for reference. Just like I mentioned in this comment: #447 (comment) |
Yes!! This is on the roadmap 🚀 Just be patient 🙏 we haven't forgotten |
Until now I've been using the cmake_conan wrapper and it allowed me to use CMake support in Visual Studio Code, being able to choose via the VS footbar the CMake build variant (debug, release, etc) and the kit (x86_64_linux, x86_64_windows, etc) .
Since Conan 2.x cmake_conan is unsupported, I tried to see which approach to use, and from what I see in the examples, it forces me to manually invoke conan to configure the toolchain and then run cmake, breaking the CMake IDE integrations . |
The only thing that's missing is a proper vscode extension that supports the new workflow (generate everything once with |
An QtCreator extension and X IDE extension and..? This is huge regression, it's hard to fathom how this was "allowed". |
As @prince-chrismc said #447 (comment), please be patient, this is in our mind, but Conan 2.0 is a massive effort, there are tons of things to do. |
@memsharded Sorry for overreacting. I guess we're just afraid of "losing" amazing tool. Congrats with 2.0 release and we are eagerly looking forward for any updates! |
Yeah, no prob, we are aware this is a requested and appreciated utility. We have not forgotten, and we will soon be thinking and discussing what can be done to move this forward in a way that makes the most sense for everyone |
@memsharded @prince-chrismc @czoido If possible, hope Conan team review this PR as soon as possible: If there exist some modification required of this PR, please let me know. sincerely. |
A proposal for 2.0 based on dependency providers and providing transparent (no need to modify CMakeLists.txt) is in https://github.com/conan-io/cmake-conan/tree/develop2, testing and feedback welcome. This is no longer on hold, lets close this ticket, and looking forward to new tickets reporting on the new proposal. |
Recently, I found that Conan decided to deprecate "cmake-conan" in Conan 2.X. For example, in this article of the blog:
Therefore, I want to confirm that:
The main reason is all about the "Chicken-And-Egg" problem which @memsharded mentioned in this issue that I posted before: #410 (comment)
Am I correct?
The text was updated successfully, but these errors were encountered: