* Resolve prefix patterns in packages declarations
* Allow prefixes in configuration parser
* A few more test cases
* Add warning for ignored patterns/packages
* Print warnings on vcpkg configuration
* Localize warning messages
* Clean up
* Test registry parsing
* Apply Billy's patch
* Apply Billy's suggestions from code review
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* Format
* Collect all package pattern warnings into one
* Improve warning message
* Format messages
* Disallow period separated segments in port names
* Error messages on invalid patterns/names
* Cleanup
* Disallow registries without setting a baseline
* Fix for artifact registries
* Billy's PR comments
* Add e2e test registry
* End-to-end tests
* Fix e2e tests
* Make tests success case silent
* Accept prefixes ending in '-'
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* Add Json::stringify overloads without specifying a style.
Most callers were just default-initializing JsonStyle which is equivalent to the WithSpaces(2) form.
WithSpaces(2) and default-initialized changed to call the new overload(s).
Callers who were stringifying 2 Json entities just to compare their strings also dropped the style parameter.
Callers who were using anything else were left alone.
* Implement new in C++.
This replaces the TypeScript implementation of new with a C++ one. Other changes:
* Now creates both vcpkg.json and vcpkg-configuration.json, which resolves "vcpkg new does not create vcpkg.json" https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1494967
* vcpkg-configuration.json can be embedded into vcpkg.json with --single-file.
* Now fills in the default registry with the current baseline git SHA.
* --name and --version are now mandatory since we are creating vcpkg.json, but they can be skipped with --application as per https://github.com/microsoft/vcpkg-tool/pull/605
* clang-format and messages
* Add unit tests.
* Add e2e test.
* Introduce zero_or_one_set.
* This is what tests are for.
* start working
* update vcpkgpaths to better support what I want
* optional: make certain `get()` is only called when
it won't result in a dangling pointer
* vcpkgpaths: remove JsonStyle support as it isn't used
* vcpkgpaths: switch from two functions returning
Optional<Manifest> + Optional<Path>,
to one function returning Optional<ManifestAndLocation>
* vcpkgpaths: add `get_configuration_and_location`
* rename get_*_and_location -> get_*
* lots of CRs
* get_latest_baseline -> configuration.cpp
* format
* optional - add see-through operator==
* add `--add-initial-baseline` option
* more correct if-elses
* add messages!
```
PS /../nimazzuc/projects/testproj> ../vcpkg-tool/build/vcpkg x-update-baseline --dry-run
registry 'https://github.com/microsoft/vcpkg' already up to date: 89295c9fe22e97ca9e380a6c771ccf2ff09dca95
registry '/a/b' not updated: default
registry 'https://foobar' not updated: default
warning: git failed to fetch remote repository https://foobar
Error: Failed to fetch ref HEAD from repository https://foobar.
fatal: unable to access 'https://foobar/': Could not resolve host: foobar
```
* update - hopefully fix Billy's CRs
* fix formatting
* (optional::operator==) add tests, add opt<T> == opt<U>
* rename things
* registry_location -> pretty_location
* ManifestAndLocation -> ManifestAndPath
* ConfigurationAndLocation -> ConfigurationAndSource
* minor other CRs
* forgot to to_string
* format
* I think this is what robert wants?
* format
* [vcpkg] Read configuration from manifest
* format
* Add feature flag
* Improve ambiguous configuration error message
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
* Make x-vcpkg-configuration a proper field of the manifest
* add Configuration and RegistryImplementation serialize
* fix format
* Allow formatting embeded vcpkg configuration
* Do not use lambda to load optional configuration
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* Minor fixes
* Fix format
* Add tests + allow $ extra-info on configuration files
* Remove feature flag and warn on use of embedded config
* Add parsing for ce fields in vcpkg-configuration.json
* Rename ce_configuration to ce_metadata
* WIP
* Fix test
* Order new fields in serialization add happy path tests
* WIP
* Tests for string fields
* Add even more tests
* Remove unused variable
* Fix CI issues
* Fix serialization of filesystem registries
* Demands are not actually recursive
* Fix CI issues
* Make settings an arbitrary object
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Co-authored-by: Mathis Logemann <mathisloge@gmail.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* [vcpkg] Read configuration from manifest
* format
* Add feature flag
* Improve ambiguous configuration error message
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
* Make x-vcpkg-configuration a proper field of the manifest
* add Configuration and RegistryImplementation serialize
* fix format
* Allow formatting embeded vcpkg configuration
* Do not use lambda to load optional configuration
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* Minor fixes
* Fix format
* Add tests + allow $ extra-info on configuration files
* Remove feature flag and warn on use of embedded config
* Fix incorrect field name in error message
* Change field order of serialized manifests
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Co-authored-by: Mathis Logemann <mathisloge@gmail.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* Delete the 'System' namespace.
* Enums -> Util
* Delete Files::
* Delete vcpkg::Files.
fs:: -> stdfs or vcpkg::Files, as appropriate.
Resolves the very common shadowing issue where we have a local variable named fs which shadows the namespace fs.
* Delete vcpkg::Files. Add stdfs::path -> vcpkg::path alias
* Fix warnings.
* Remove all const path& path instances.
Also fix a few remaining .string() and .generic_string() s.
* [vcpkg registries] support versions
This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.
There is one major difference between this PR and the RFC (#13590), which is that instead of version files looking like:
```json
[
...
]
```
version files look like:
```
{
"versions": [
...
]
}
```
this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
* [vcpkg] Split vcpkg/base/json.h into vcpkg/base/jsonreader.h
* [vcpkg] Extract definitions of Configuration-Deserializer (& friends)
These types are only used by VcpkgPaths during the initial parse.
* [vcpkg] Introduce levenshtein-distance suggestions for json errors
* [vcpkg] Fix regression in supports handling
* [vcpkg] Fix signed/unsigned mismatch
* [vcpkg] Address CR comments
* [vcpkg] Address CR comments
* Fix compiler error from merge conflict.
* [vcpkg] Change parameters of Reader::check_for_unexpected_fields to better match declaration
* [vcpkg] Improve errors from features set
* [vcpkg] Fix includes
* [vcpkg] Reuse code
* [vcpkg] Check the "name" field always to maximize error information
* [docs] Improve english phrasing in manifests.md
* [vcpkg] Correct docs link for manifests
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
* [vcpkg] Fix error reporting on json parse failure
* [vcpkg] Track manifest path for use in diagnostics
* [vcpkg] Use by-value for consumer API. Improve trailing comma diagnostic.
* [vcpkg] Track errors directly inside Json::Reader
* [vcpkg] Fixup use of .u8string()
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>