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

Design Proposal - Using Conan.io instead of Mason #526

Closed
wants to merge 0 commits into from

Conversation

thehoneymad
Copy link
Collaborator

In this pull request, I am contributing a proposal for:

  1. Removing usage of Mason.
  2. Using conan.io to manage precompiled binary dependencies.
  3. Using conan.io to manage mapbox dependencies such as earcut.cpp and geojson-vt-cpp.

@@ -0,0 +1,67 @@
# Using Conan.io instead of Mason
MapLibre GL Native stil uses [Mason](https://github.com/mapbox/mason), Mapbox's depcreated cross platform C/C++ package manager to resolve precompiled binaries for third party dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo deprec..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, will fix. :)

@wipfli
Copy link
Contributor

wipfli commented Oct 8, 2022

Thanks for this nice Design Proposal, @thehoneymad. I think it is a good idea to remove Mason. Conan seems like a good option.

@wipfli
Copy link
Contributor

wipfli commented Oct 8, 2022

So there will be this conanfile with exact versions if I understand correctly. Is this a bit like an NPM package-lock.json file? And can dependabot make pull requests with updates for us?

@wipfli
Copy link
Contributor

wipfli commented Oct 8, 2022

Also how is Mason or now conan related to the dependencies we have in the vendor folder with the submodules?

@ntadej
Copy link
Collaborator

ntadej commented Oct 8, 2022

What precompiled dependencies do we even have? Aren't all covered by submodules?

@thehoneymad
Copy link
Collaborator Author

Acknowledging comments. Will reply soon.

@thehoneymad
Copy link
Collaborator Author

So there will be this conanfile with exact versions if I understand correctly. Is this a bit like an NPM package-lock.json file? And can dependabot make pull requests with updates for us?

Yes. Conanfile asks for exact version. It does not support version ranges.

On the dependabot question, sadly both conan and vcpkg is missing dependabot. But it is a great question. How about if this proposal gets approved, we can add a task to implement it?

@wipfli
Copy link
Contributor

wipfli commented Oct 11, 2022

Feel free to add the design proposal to the agenda for tomorrows mewting

@thehoneymad
Copy link
Collaborator Author

Also how is Mason or now conan related to the dependencies we have in the vendor folder with the submodules?

This is a great question. We currently use github sudmodules to pull nearly all dependencies. None of them are precompiled binaries. I will double check again.

But we are depedent on Mason who wires key dependencies for us such as Boost, RapidJSON and Mapbox dependencies.

My high level goal here is to limit the build process as much as possible to only building MapLibre Native and guarantee a confident build on nearly every commit.

Do you peeps see value in a document that explains how and from where our depdencies are wired?

@ntadej
Copy link
Collaborator

ntadej commented Oct 11, 2022

Also how is Mason or now conan related to the dependencies we have in the vendor folder with the submodules?

This is a great question. We currently use github sudmodules to pull nearly all dependencies. None of them are precompiled binaries. I will double check again.

But we are depedent on Mason who wires key dependencies for us such as Boost, RapidJSON and Mapbox dependencies.

My high level goal here is to limit the build process as much as possible to only building MapLibre Native and guarantee a confident build on nearly every commit.

Do you peeps see value in a document that explains how and from where our depdencies are wired?

I suspect Mason was used to bump the dependencies (or do similar automation), but we never actually call it.

I would propose this actually:

  • remove Mason support
  • evaluate used dependencies per platform
  • then consider which package manager to use (if any)

I'm afraid that it will be hard to support desktop and mobile platforms with compatible pre-built binaries for all platforms.

We can discuss more tomorrow.

@thehoneymad
Copy link
Collaborator Author

thehoneymad commented Oct 11, 2022

What precompiled dependencies do we even have? Aren't all covered by submodules?

Great question.

Yes, all of them are currently covered by the git submodules. But the build process is a bit of a mudball. Unless one deeply knows how Mason wires the dependencies in the right order, we are in risk of:

  1. Bad builds due to key dependency being added in wrong order. [Boost, RapidJSON]
  2. Bad builds due to Mapbox removing packages from Github. [Mason, geojson-vt, earcut.cpp, protozero, polylabel etc]

Mason can provide static includes and binaries both. :)

@thehoneymad
Copy link
Collaborator Author

A great usage of Conan can be seen in open source routing engine Valhalla

@thehoneymad
Copy link
Collaborator Author

Also how is Mason or now conan related to the dependencies we have in the vendor folder with the submodules?

This is a great question. We currently use github sudmodules to pull nearly all dependencies. None of them are precompiled binaries. I will double check again.
But we are depedent on Mason who wires key dependencies for us such as Boost, RapidJSON and Mapbox dependencies.
My high level goal here is to limit the build process as much as possible to only building MapLibre Native and guarantee a confident build on nearly every commit.
Do you peeps see value in a document that explains how and from where our depdencies are wired?

I suspect Mason was used to bump the dependencies (or do similar automation), but we never actually call it.

I would propose this actually:

* remove Mason support

* evaluate used dependencies per platform

* then consider which package manager to use (if any)

I'm afraid that it will be hard to support desktop and mobile platforms with compatible pre-built binaries for all platforms.

We can discuss more tomorrow.

Another good call out. I checked out Conan recipes for that purpose. I am not sure it will do everything but we can have platform (arch) specific recipes for binaries or sources. :)

@thehoneymad
Copy link
Collaborator Author

This is not dead yet. I will come back to this promptly after my MapLibre whitepaper work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants