vcpkg with vcpkg.json cli improvemnts

Created on 7 Nov 2020  路  8Comments  路  Source: microsoft/vcpkg

DISCLAIMER: I understand that vcpkg is not npm (node package manager) nor is it composer (php package manager), what I am trying to achieve here is to not only enrich vcpkg functionality but also make the life of developers that use vpckg easier and less error prone.

Hey,

I have recently started using the vpckg.json which is a great improvement (many thanks for adding this).
The following are just a few things I hope are added in one way or another:

No automated way to generate vcpkg.json

Many package managers use files similar to vcpkg.json to manage their dependencies but from my experience the vast majority offer a way to generate the file for the user.
They either generate something from a very simple template or have an interactive way to generate the file where the applications goes through a series of questions to create the manifest file.

No more vcpkg install <package>

When I run vcpkg install <package> inside a directory that has a vcpkg.json I get the following error:

Error: 'install' requires 0 arguments, but 1 were provided.
Example:
  vcpkg install --triplet x64-windows
  ```

This doesn't seem right to me, I think the correct behaviour should be:
- Vcpkg installs `<package>`
- Vcpkg adds  `<package>` to the list of `dependencies` inside `vcpkg.json`

**No more helpful cmake tips**

When I run, for ex.: `vcpkg install rapidjson`, outside a directory that has a `vcpkg.json` file,
I get the following:

Computing installation plan...
The following packages will be built and installed:
rapidjson[core]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: rapidjson:x64-windows
Building package rapidjson[core]:x64-windows...
Using cached binary package: C:...vcpkg\archives\77\77008b942d5f50455c60333ad10d813145b3e6dc.zip
Building package rapidjson[core]:x64-windows... done
Installing package rapidjson[core]:x64-windows...
Installing package rapidjson[core]:x64-windows... done
Elapsed time for package rapidjson:x64-windows: 216.1 ms

Total elapsed time: 3.388 s

The package rapidjson provides CMake integration:

find_package(RapidJSON CONFIG REQUIRED)
target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS})

```

The CMake integration text, for me, is quite useful.

When I run the vcpkg install command inside a directory with vcpkg.json I get no such information.
Can we get a list of all the CMake integrations information when we run vcpkg install (of all the packages)?

Thanks!

vcpkg-feature

All 8 comments

Thanks for advice!

@AntonioCS fwiw, this is all planned for vcpkg; it's just that manifests are an early feature, and we haven't implemented all of the nice features yet :)

If you'd like to help, we would appreciate it, but at this point we have fewer hours in the week than hours we need to implement everything 馃槃

@strega-nil cool cool!! Thank you for letting me know!
Is there a guide on how best to help/contribuite in terms of working with vcpkg code? I could always try :grinning: (not the best c++ dev, but also not the worst)

@AntonioCS unfortunately, not really; however, if you're on the discord, you can ping me (@strega-nil) and I'll try to work with you on it :)

@strega-nil I am on the cpp slack #vcpkg channel, don't know about the one on discord, will investigate! Thanks

Yup! Sorry, not on the slack for Reasons.

@strega-nil Sure, can you share what the discord is? I google for c++ discord and many appear. Thanks

@AntonioCS https://www.includecpp.org, we're in the #vcpkg channel under Libraries/Tools

Was this page helpful?
0 / 5 - 0 ratings