* Don't require a name or version in "project" manifests.
In resolving https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1494960 "[vcpkg ce] vcpkg-ce does not find vcpkg.json to find vcpkg-configuration.json" I ran into a problem for existing vcpkg artifacts-only customers, where today they can name artifact dependencies without needing to supply a name or version. I want to be able to provide a reasonable "how to fix it" message for these customers and it seems reasonable to be able to declare dependencies without having a name or version. After some discussion with @ras0219-msft and @vicroms , the requirement for a name and version seems to be a historical artifact of using the same code to parse both port manifests and consumer/project manifests.
include/vcpkg/sourceparagraph.h:
Rename parse_manifest_object to parse_port_manifest_object and add parse_project_manifest_object.
include/vcpkg/versiondeserializers.h:
Declare visit_optional_schemed_deserializer (with static removed in the versiondeserializers.cpp)
include/vcpkg/versions.h:
Add VersionScheme::Missing for the case that it isn't provided.
cmakevars.cpp:
Use "_manifest_" as the "port" name when a name wasn't supplied for purposes of vcpkg_get_dep_info.
add.ps1:
Add a new test of add port that uses an input manifest with no name or version information.
manifests.ps1:
Remove name and version from the prototype manifest. Note that some of the tests still use a manifest with a name; in particular the "self reference" ones so we still have coverage of that.
format-manifest.ps1:
Add project manifest examples in addition to the previous "reserialize all ports" test.
* Put the json entity type assert in the right place.
* Use JSON stuff rather than string stuff in the parsing tests.
* Invert template method pattern in manifest deserializer.
* Formatting
* Add overlay ports test.
* Add output asserts.
* Don't fail on nonexistant installed ports.
Error msg was also wrong.
* add e2e test
* add Throw-IfFailed
* add 'if ($IsWindows)' and install another port for testing
* Retain detailed error information when finding the baseline fails
* apply diff from ci
* Avoid allocations in print_error_message
* Fix print_error_message last. Include origin information in manifest errors
Co-authored-by: Alexander Neumann <you@example.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>