nemequ/hedley

Adding Hedley to VCPKG

pratikpc opened this issue · 5 comments

I think Hedley would do well as part of Package Managers such as Vcpkg and Conan.
It would certainly make Hedley easier to add and manage to projects, particularly those utilising CMake.
We could probably look at nlohmann/json's port which also is Header Only

I'm not really familiar with vcpkg and conan, so I can't speak to them specifically, but I don't really understand the benefit in this case, just because of how Hedley works… Hedley is a single header file that you can drop into your tree, and that's it. You don't need to add any compiler flags, dependencies on shared libraries, or even configure-time feature detection. Literally all you should have to do is drop hedley.h into your tree and #include "hedley.h". The only real benefit of a package manager I can think of would be to make it easier to keep Hedley up-to-date.

Am I missing something? I certainly don't mind the idea of making Hedley easier to use, and if you think people would find this useful I'd be happy to add whatever is necessary to get it working.

The only real benefit of a package manager I can think of would be to make it easier to keep Hedley up-to-date.

That and the fact that Hedley becomes more easy to install and access for the many people using vcpkg or Conan.
It also becomes easier for libraries that depend on Hedley( I am not sure if there exist any libraries dependent on Hedley in vcpkg) because now in their vcpkg all they need to do is add Hedley as a dependency

I'd expect packages which depend on Hedley to include a copy of hedley.h instead of pulling it in via a package manager, but I guess if you're already using a package manager for other stuff you may as well do it for Hedley, too.

Hedley is structured in a way that allows you to include multiple copies of it; if you include a newer version all the old macros will be undefined and redefined to the newer values, and if you include an older version it will be silently ignored. There won't be any symbol conflicts or performance problems, it will just work. So there isn't really a problem with everyone having their own copy.

I'm probably not going to do the work on this one; someone who actually uses the tool(s) in question would be much better suited. That said, if anyone wants to submit a PR I'd be receptive. Or would this be done in the package manager's repo (it looks like that's what that json package is doing)?

The Package Manager's repo... At least for vcpkg

Ok, then I'm going to go ahead and close this issue. If there is anything I can/should do in this repo please feel free to reopen this issue, or create another one.

If anyone wants to put something together for vcpkg or any other package manager please feel free to tag me; I'm happy to do what I can to facilitate and/or answer questions, but I think the work should be done by people who would actually use the code so we don't end up with a weird package that breaks expectations.