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

Publish Conan recipe for rippled #4443

Closed
thejohnfreeman opened this issue Mar 1, 2023 · 0 comments
Closed

Publish Conan recipe for rippled #4443

thejohnfreeman opened this issue Mar 1, 2023 · 0 comments
Assignees
Labels
Feature Request Used to indicate requests to add new features

Comments

@thejohnfreeman
Copy link
Collaborator

In the past few weeks, I have helped two coworkers write CMake for new projects that depend on the xrpl_core library1. There are probably more people outside the company who want to perform this task. Until recently, we had outdated instructions that haven't worked since the move to Conan because the project's CMake no longer downloads and builds its dependencies2.

My favored solution is to publish a Conan recipe for rippled and let dependents use Conan for their projects. We're already halfway there with the move to Conan for our own dependencies. In fact, fixing the package_info method in our recipe might be the only missing piece. It would be trivial to publish the recipe in this codebase, and I would consider that a success. It will be a separate effort to get the recipe included in ConanCenter, but that would be an even bigger success.

Footnotes

  1. We should rename this to libxrpl before we invite even more dependents.

  2. I'll be including updated instructions in new documentation.

@thejohnfreeman thejohnfreeman added the Feature Request Used to indicate requests to add new features label Mar 1, 2023
@thejohnfreeman thejohnfreeman self-assigned this Mar 1, 2023
intelliot pushed a commit that referenced this issue Mar 23, 2023
Make it easy for projects to depend on libxrpl by adding an `ALIAS`
target named `xrpl::libxrpl` for projects to link.

The name was chosen because:

* The current library target is named `xrpl_core`. There is no other
  "non-core" library target against which we need to distinguish the
  "core" library. We only export one library target, and it should just
  be named after the project to keep things simple and predictable.
* Underscores in target or library names are generally discouraged.
* Every target exported in CMake should be prefixed with the project
  name.

By adding an `ALIAS` target, existing consumers who use the `xrpl_core`
target will not be affected.

* In the future, there can be a migration plan to make `xrpl_core` the
  `ALIAS` target (and `libxrpl` the "real" target, which will affect the
  filename of the compiled binary), and eventually remove it entirely.

Also:

* Fix the Conan recipe so that consumers using Conan import a target
  named `xrpl::libxrpl`. This way, every consumer can use the same
  instructions.
* Document the two easiest methods to depend on libxrpl. Both have been
  tested.
* See #4443.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Used to indicate requests to add new features
Projects
None yet
Development

No branches or pull requests

1 participant