From 3d0e722176da707dc3af2ef42bc37fa074b9e979 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 12 Jun 2025 21:50:14 +0100 Subject: [PATCH] fix: Use conan v2 dirs and commands in docs (#2219) --- .github/actions/save_cache/action.yml | 2 +- docker/develop/compose.yaml | 2 +- docs/build-clio.md | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/save_cache/action.yml b/.github/actions/save_cache/action.yml index 9898def5..f32f061e 100644 --- a/.github/actions/save_cache/action.yml +++ b/.github/actions/save_cache/action.yml @@ -3,7 +3,7 @@ description: Save conan and ccache cache for develop branch inputs: conan_dir: - description: Path to .conan directory + description: Path to Conan directory required: true conan_profile: description: Conan profile name diff --git a/docker/develop/compose.yaml b/docker/develop/compose.yaml index 4fb23b7c..8526a970 100644 --- a/docker/develop/compose.yaml +++ b/docker/develop/compose.yaml @@ -2,7 +2,7 @@ services: clio_develop: image: ghcr.io/xrplf/clio-ci:latest volumes: - - clio_develop_conan_data:/root/.conan/data + - clio_develop_conan_data:/root/.conan2/p - clio_develop_ccache:/root/.ccache - ../../:/root/clio - clio_develop_build:/root/clio/build_docker diff --git a/docs/build-clio.md b/docs/build-clio.md index ca791ea2..84deeee4 100644 --- a/docs/build-clio.md +++ b/docs/build-clio.md @@ -19,7 +19,7 @@ ### Conan Configuration -Clio requires `compiler.cppstd=20` in your Conan profile (`~/.conan/profiles/default`). +Clio requires `compiler.cppstd=20` in your Conan profile (`~/.conan2/profiles/default`). > [!NOTE] > Although Clio is built using C++23, it's required to set `compiler.cppstd=20` for the time being as some of Clio's dependencies are not yet capable of building under C++23. @@ -67,12 +67,12 @@ conan remote add --index 0 ripple http://18.143.149.228:8081/artifactory/api/con Now you should be able to download the prebuilt `xrpl` package on some platforms. > [!NOTE] -> You may need to edit the `~/.conan/remotes.json` file to ensure that this newly added artifactory is listed last. Otherwise, you could see compilation errors when building the project with gcc version 13 (or newer). +> You may need to edit the `~/.conan2/remotes.json` file to ensure that this newly added artifactory is listed last. Otherwise, you could see compilation errors when building the project with gcc version 13 (or newer). -Remove old packages you may have cached. +Remove old packages you may have cached interactively. ```sh -conan remove -f xrpl +conan remove xrpl ``` ## Building Clio @@ -152,24 +152,24 @@ If you wish to develop against a `rippled` instance running in standalone mode t Sometimes, during development, you need to build against a custom version of `libxrpl`. (For example, you may be developing compatibility for a proposed amendment that is not yet merged to the main `rippled` codebase.) To build Clio with compatibility for a custom fork or branch of `rippled`, follow these steps: -1. First, pull/clone the appropriate `rippled` fork and switch to the branch you want to build. - The following example uses an in-development build with [XLS-33d Multi-Purpose Tokens](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033d-multi-purpose-tokens): +1. First, pull/clone the appropriate `rippled` version and switch to the branch you want to build. + The following example uses a `2.5.0-rc1` tag of rippled in the main branch: ```sh - git clone https://github.com/shawnxie999/rippled/ + git clone https://github.com/XRPLF/rippled/ cd rippled - git switch mpt-1.1 + git checkout 2.5.0-rc1 ``` 2. Export a custom package to your local Conan store using a user/channel: ```sh - conan export . my/feature + conan export . --user=my --channel=feature ``` 3. Patch your local Clio build to use the right package. - Edit `conanfile.py` (from the Clio repository root). Replace the `xrpl` requirement with the custom package version from the previous step. This must also include the current version number from your `rippled` branch. For example: + Edit `conanfile.py` in the Clio repository root. Replace the `xrpl` requirement with the custom package version from the previous step. This must also include the current version number from your `rippled` branch. For example: ```py # ... (excerpt from conanfile.py) @@ -180,7 +180,7 @@ Sometimes, during development, you need to build against a custom version of `li 'protobuf/3.21.9', 'grpc/1.50.1', 'openssl/1.1.1v', - 'xrpl/2.3.0-b1@my/feature', # Update this line + 'xrpl/2.5.0-rc1@my/feature', # Use your exported version here 'zlib/1.3.1', 'libbacktrace/cci.20210118' ]