Use only named packages from extra registries#35
Conversation
This change prevents errors from RegistryEntry::get_path_to_version() when the default registry doesn't have a port for a name which is part of some extra registry but not listed that registry's "packages" configuration field. This is consistent with RegistrySet::registry_for_port() which only considers the the named packages from the extra registries.
|
Thanks for the PR! This change looks generally good to me, however could you go into more detail about what the precise error is and what the expected result was? |
|
FWIW, this is why https://github.com/microsoft/vcpkg-tool/pull/35/files#diff-d4fe92b1ebc56fd05568a18c509672434c578cf4e147b2d5aad36226c026ff00L440-L447 exists; is there a reason that you're making this change? |
I want to combine
vcpkg commands fail like this: where 3fd.json neither exists in default-registry ( Reproducer (bash, but modeled after azure-pipelines/end-to-end-tests-dir/registries.ps1): |
ras0219-msft
left a comment
There was a problem hiding this comment.
This LGTM, loading all registry ports shouldn't enumerate ports beyond default + packages of each other registry. It should exactly match the valid values of RegistrySet::registry_for_port().
|
@strega-nil |
The following PRs are included: * hopefully fix crash in constraints (#60) * [vcpkg] allow --version to check the version (#50) * Remove baseline warning (#27) * [git] always pass autocrlf=false (#58) * ignore QtCreator CMake project files (#54) * ignore .DS_store files (#53) * [vcpkg] x-add-version now also checks if the manifest file is properly formatted (#43) * hopefully fix ci issue #16773 (#34) * Add docs to set VCPKG_ROOT to run tests (#45) * [vcpkg] x-add-version improve speed by calling get_builtin_baseline only once (#44) * add clang-format version to format-cxxcode (#41) * [vcpkg] Introduce experimental workaround X_VCPKG_NUGET_ID_PREFIX (#40) * [supports] Add `native` identifier expression and x-check-support command (#29) * [metrics] Split reporting of installs into name:triplet (#39) * [vcpkg] Improve error when accessing missing feature (#38) * [vcpkg] Allow shallow git registries (#37) * Disable git autocrlf when archiving tree (#36) * Use only named packages from extra registries (#35) * [registries] add metrics (#30) * Add vcpkg policy cmake helper port support (#17) * [osx] add support for rosetta (#23) * don't build tls12-download unless it's needed (#33) * Add new telemetry points for versioning (#21) * add cmake_minimum_required to vcpkg_tags (#25) * [x-add-versions] Perform atomic replacement of versioning files (#28) * [tools] support gsutil (#19) * add CUDA 11.1 and 11.2 to KEEP_ENV_VARS defaults (#26) * Add finite timeout on CURL metrics endpoint. (#22) * fix UB in make_error_code(utf8_errc) (#18)
This change resolves errors from RegistryEntry::get_path_to_version() when the default registry doesn't have a port for a name which is part of some extra registry but not listed in that registry's "packages" configuration field.
This is consistent with RegistrySet::registry_for_port() which only considers the the named packages from the extra registries.
Use case: