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

[osqp-eigen, osqp] Add new port #41676

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Conversation

aboelens
Copy link

@aboelens aboelens commented Oct 20, 2024

  • Changes comply with the maintainer guide.
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@JonLiu1993 JonLiu1993 changed the title Add osqp [osqp-eigen, osqp] Add new port Oct 21, 2024
@JonLiu1993 JonLiu1993 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Oct 21, 2024
@aboelens
Copy link
Author

aboelens commented Oct 21, 2024 via email

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

Consider adding license to the manifest.

Please trim the patches. Keep them minimal.

  • Use CMake options to skip blocks or disable depedencies/features.
  • Skip whole blocks with if(0).
  • Remove lines instead of commenting them.

ports/osqp-eigen/portfile.cmake Outdated Show resolved Hide resolved
ports/osqp-eigen/portfile.cmake Outdated Show resolved Hide resolved
@JonLiu1993 JonLiu1993 marked this pull request as draft November 11, 2024 07:39
Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

Early feedback.

ports/osqp/portfile.cmake Outdated Show resolved Hide resolved
ports/osqp-eigen/portfile.cmake Outdated Show resolved Hide resolved
ports/osqp-eigen/portfile.cmake Outdated Show resolved Hide resolved
ports/osqp-eigen/portfile.cmake Outdated Show resolved Hide resolved
ports/osqp-eigen/vcpkg.json Outdated Show resolved Hide resolved
ports/osqp-eigen/vcpkg.json Outdated Show resolved Hide resolved
ports/osqp-eigen/vcpkg.json Show resolved Hide resolved
ports/osqp/osqp.patch Outdated Show resolved Hide resolved
Comment on lines 14 to 19
vcpkg_download_distfile(
QDLDL
URLS "https://github.com/osqp/qdldl/archive/refs/tags/v0.1.5.tar.gz"
FILENAME "qdldl-0.1.5.tar.gz"
SHA512 3a224767708484d6728e4b0801210c5e7d4e906564c0855c7987876316cde7349c2717a169b4a6680495b0c71415be383e3e5c6826873fb92d7e93258a7a03a8
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a candidate for a separate port?

Copy link
Author

Choose a reason for hiding this comment

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

It is currently loaded as a git sub module, which is why I took this approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fyi I opened an issue on this upstream some time ago: osqp/osqp#85 . If I recall correctly the critical point is that osqp package also has some code-generation functionalities, and so at least for those they need access to qdldl source code, but I guess there is nothing preventing using an external qdldl for all other uses.

Copy link
Contributor

Choose a reason for hiding this comment

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

And apparently I forgot that eventually we devendored qdldl in conda-forge, see https://github.com/conda-forge/libosqp-feedstock/blob/main/recipe/patches/0002-build-qdldl-interface-as-part-of-osqp.patch and conda-forge/libosqp-feedstock#8 .

fyi @h-vetinari as he is the author of the patch, so I guess he need to be onboard for the patch to be used here unless the copyright info of the conda-forge feedstock needs to be added here somehow.

Choose a reason for hiding this comment

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

The feedstock is under bsd-3 license so the patch can be used freely. If properly attributed, even better.

Choose a reason for hiding this comment

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

Also worth noting: I didn't expect my somewhat incomplete hack to survive so long - osqp 1.0 has been on the horizon for ~2 years now...

Copy link
Author

Choose a reason for hiding this comment

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

So the consensus is that qdldl should be a separate port?

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I do not have any strong opinion in one sense or another on this, at least at the vcpkg level.

Copy link
Contributor

Choose a reason for hiding this comment

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

qdldl has independent versioning, and it is listed on repology:
https://repology.org/project/qdldl/versions
I have a preference for a separate port, but this is just personal opinion, and I don't know how much patching this really involves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants