vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[corrosion] Add the Corrosion CMake Tool

Open gauntl3t12 opened this issue 2 years ago • 10 comments

  • [X] Changes comply with the maintainer guide.
  • [X] 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.
  • [X] 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.
  • [X] The versioning scheme in vcpkg.json matches what upstream says.
  • [X] The license declaration in vcpkg.json matches what upstream says.
  • [X] The installed as the "copyright" file matches what upstream says.
  • [X] The source code of the component installed comes from an authoritative source.
  • [X] The generated "usage text" is accurate. See adding-usage for context.
  • [x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • [x] Only one version is in the new port's versions file.
  • [x] Only one version is added to each modified port's versions file.

gauntl3t12 avatar Jan 26 '24 02:01 gauntl3t12

It wasn't originally clear to me that you want each version in a separate MR (if I'm reading the MR template correctly). I can back out 0.4.1+ and submit the other 7 as separate MRs.

gauntl3t12 avatar Jan 26 '24 02:01 gauntl3t12

@microsoft-github-policy-service agree

gauntl3t12 avatar Jan 26 '24 02:01 gauntl3t12

Closing to relaunch as individual MRs with fixes applied for platforms other than linux

gauntl3t12 avatar Jan 26 '24 02:01 gauntl3t12

IMO it is really enough to add only 0.4.7 from the 0.4 series. By common conventions, these are patch releases.

dg0yt avatar Jan 26 '24 06:01 dg0yt

Reopening as only submitting 1 version per @dg0yt suggestion

gauntl3t12 avatar Jan 27 '24 18:01 gauntl3t12

Mark info:reviewed for further review.

Note: It has a dependency on both the Rust compiler (cargo) and a C++ compiler.

MonicaLiu0311 avatar Feb 05 '24 09:02 MonicaLiu0311

Note: It has a dependency on both the Rust compiler (cargo) and a C++ compiler.

Corrosion maintainer here. Just to clarify, a C++ compiler is not required from Corrosions side. If you want to integrate Rust code into a C++ project, then of course a C++ compiler is required to compile and link the C++ code. But it's perfectly possible to use Corrosion with C + Rust projects, in which case a C-compiler is sufficient, or even just use Corrosion to only build rust code without building or linking any C or C++ code.

jschwe avatar Feb 09 '24 08:02 jschwe

Vcpkg generally does not accept a port with only CMake helpers unless a specific C++ library requires it to build. Can you give an example? Also, I'm not exactly sure what benefit this port provides over the upstream recommended way of acquiring these helpers with FetchContent.

data-queue avatar Feb 10 '24 03:02 data-queue

The test project I linked too was used a proof of concept to convenience my team of porting common utility code from C++ to open source rust projects. The projects we've updated are all behind proxies and cannot be shared on public GitHub.

The issue with FetchContent is that Vcpkg disables it by default. As my team develops code released on internal private Vcpkg registries, our port now need to go enable FetchContent again. That's a poor solution and requires us to maintain two different forms of dependency version control. Vcpkg shouldn't really make the statement that everything should come from Vcpkg, but also things should come from features that we disable by default. It wasn't clear or well documented that you even disable FetchContent. It took me 2-3 hours to figure out and resolve the issue.

gauntl3t12 avatar Feb 10 '24 04:02 gauntl3t12

Also, cmakerc is exactly that a cmake helper.

gauntl3t12 avatar Feb 10 '24 04:02 gauntl3t12

Hi @bconn98

The vcpkg team had a discussion regarding this PR and interactions between C++ and Rust projects. Here’s a summary of our thoughts:

We believe that the integration of Rust dependencies in C++ projects is becoming increasingly important and we want vcpkg to provide the best experience possible for C++ developers.

However, we are wary about two potential issues:

  • Unresolved technical issues that may arise from this integration. For example, what happens when a cargo package requires vcpkg-installed dependencies?
  • The implications for acquiring Rust dependencies within the vcpkg ecosystem that this PR could create.

Given that you are already using private registries, we believe that keeping this port as part of your team’s private registry is the best way forward. It also lets you make changes as needed without concern of breaking external users.

Please let us know if you have any further questions or concerns.

vicroms avatar Feb 27 '24 08:02 vicroms

Unfortunate but I understand.

gauntl3t12 avatar Feb 29 '24 02:02 gauntl3t12

Closed by reasoning explained here: https://github.com/microsoft/vcpkg/pull/36369#issuecomment-1966055372

We may revise our stance in the future once the team has spent time designing a good Rust integration experience.

vicroms avatar Feb 29 '24 02:02 vicroms

Vcpkg generally does not accept a port with only CMake helpers unless a specific C++ library requires it to build. Can you give an example?

eg. Slint, a declarative GUI developed by some former Qt developers.

ArcticLampyrid avatar Aug 01 '24 07:08 ArcticLampyrid