Skip to content

conan update #251

Closed
xakod wants to merge 35 commits into
userver-framework:developfrom
xakod:feauture/conan-update
Closed

conan update #251
xakod wants to merge 35 commits into
userver-framework:developfrom
xakod:feauture/conan-update

Conversation

@xakod

@xakod xakod commented Feb 12, 2023

Copy link
Copy Markdown
Contributor

Update conan recipe:

  • migrate to v2 recipe with support for old generators
  • add components with dependencies

Closes #250

There are no separate utest and ubench targets, you have to include garbage in the production service
    We know that the API for separate targets will be changed in Conan 2.0, but the state above is unacceptable
It's not obvious how to use userver/cmake/GrpcTargets.cmake and UserverTestsuite.cmake in the service
    It's not obvious how to reach them. Service templates suggest including userver/cmake/SetupEnvironment.cmake to make the above scripts visible, which is backwards and does not work
userver/conan/test_package should contain tests for the following features (which should serve both as a sample and as a GitHub CI test):
    Separate userver::utest target
    Separate userver::ubench target
    Usable GrpcTargets.cmake
    Usable UserverTestsuite.cmake

Current status:

  • Separate targets: core, every component, universal, utest, ubench.
  • Add usable GrpcTargets, UserverTestsuite, AddGoogleTests with examples in test packages
  • Test package for every component
  • Userve-core target style instead of desired userver::core due to upstream examples use "userver-" style. Possible solutions: create alias for every target, change targets in upstream
  • Autoformat conanfile
  • Pip packages for testsuite inside conanfile (blocked by Add PythonVirtualEnv helper and CMakePythonDeps generator conan-io/conan#11601)

@xakod xakod closed this Feb 19, 2023
@xakod xakod reopened this Feb 19, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 19, 2023
@userver-framework userver-framework unlocked this conversation Feb 20, 2023
Comment thread cmake/UserverTestsuite.cmake Outdated
Comment thread cmake/UserverTestsuite.cmake Outdated
Comment thread conanfile.py
Comment thread conanfile.py
Comment thread conanfile.py Outdated
Comment thread conanfile.py Outdated
Comment thread conanfile.py Outdated
Comment thread core/CMakeLists.txt
Comment thread conan/test_package/CMakeLists.txt Outdated
Comment thread conan/test_package/CMakeLists.txt
@xakod xakod force-pushed the feauture/conan-update branch 4 times, most recently from 0ad155f to 66839f9 Compare February 26, 2023 20:28
@xakod xakod force-pushed the feauture/conan-update branch 2 times, most recently from c506ea5 to b2129c6 Compare March 6, 2023 13:05
@xakod xakod marked this pull request as ready for review March 7, 2023 09:53
@xakod xakod changed the title [WIP] conan update conan update Mar 7, 2023
@xakod xakod requested a review from Anton3 March 7, 2023 10:03
@xakod xakod force-pushed the feauture/conan-update branch 2 times, most recently from 6961895 to 106bd5f Compare March 11, 2023 13:47
Comment thread conan/test_package/test_universal.cpp Outdated
Comment thread cmake/GrpcConan.cmake Outdated
Comment thread conan/test_package/testsuite-support/src/dynamic_config.cpp Outdated
@xakod xakod force-pushed the feauture/conan-update branch from 106bd5f to 92d9ba9 Compare April 9, 2023 19:46
@xakod xakod requested a review from Anton3 April 10, 2023 13:27
Comment thread .github/workflows/ci-conan.yml Outdated
Comment thread cmake/GrpcTargets.cmake Outdated
Comment thread conan/test_package/hello_service/dynamic_config_fallback.json
Comment thread conan/test_package/hello_service/hello_service.cpp Outdated
Comment thread core/CMakeLists.txt Outdated
Comment thread conan/test_package/CMakeLists.txt
Comment thread conan/test_package/hello_service/CMakeLists.txt Outdated
Comment thread conan/test_package/hello_service/CMakeLists.txt Outdated
Comment thread conan/test_package/hello_service/CMakeLists.txt
@xakod xakod requested a review from Anton3 April 11, 2023 08:52
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 12, 2023
@xakod xakod deleted the feauture/conan-update branch April 12, 2023 18:38
Riferus pushed a commit to Riferus/userver that referenced this pull request Aug 24, 2023
- prepare for migration to Conan 2.x recipe
- split the Conan package into components with separate dependencies
- separate targets when building with Conan: `userver::core`, every component, `universal`, `utest`, `ubench`
- add usable `GrpcTargets`, `UserverTestsuite`, `AddGoogleTests` cmake scripts with examples in test packages
- add a test for every component

Closes userver-framework#250

Tests: протестировано CI
Pull Request resolved: userver-framework#251
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues when building userver with Conan

2 participants