* [vcpkg] Remove globally-constructed pre-defined Triplets from vcpkg.exe
The tool should be as triplet-agnostic as possible, which leaves little room for special, pre-defined names like this. However, tests do have use of them: moved into test assets.
* [vcpkg] Move predefined tools strings vcpkgpaths.h -> tools.h
* [vcpkg] Add forward declarations to vcpkgpaths.h to reduce header deps
* Merge from origin/master
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* [vcpkg] Improve error reporting in vcpkg::Json
* [vcpkg] Lift --x-json to a common option
* [vcpkg] Address warnings-as-errors in VS2015
* [vcpkg] Remove unused local
* [vcpkg] Extract vcpkg::Install::get_cmake_usage
* [vcpkg] Implement vcpkg::serialize_ipv(ipv, paths)
* [vcpkg] Implement x-package-info to enable tooling
* [vcpkg] Fixup tests to respect new cli mode
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* [vcpkg] Fix resolution of default features when using Manifest mode
During manifest mode, the dependencies in the manifest should be treated as explicitly specified -- curl[core] should not install curl's default features.
* [vcpkg] Improve error message when failed to parse manifest file
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* [vcpkg] Add `vcpkg export` to E2E tests. Enable E2E tests on MacOS.
* [vcpkg] Fix export --raw --output-dir=/path/ by changing directory to new export root
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
* [vcpkg format-manifest] initial convert-control attempt
TODO: manifest comments! we should keep $directives
* Finalize x-format-manifest
First, fix Json::parse -- "\c", for any c, was incorrectly parsed.
It would emit the escaped character, and then parse the character, so
that `\b` would give you { '\b', 'b' }.
Second, canonicalize source paragraphs as we're parsing them. This found
an error in qt5 -- The `declarative` feature was listed twice, and we
now catch it, so I removed the second paragraph.
Add PlatformExpression::complexity to allow ordering platform
expressions in a somewhat reasonable way.
Notes:
- We allow `all_modules` as a feature name for back-compat with
paraview
- In order to actually convert CONTROL to vcpkg.json, we'd need to
rename the qt5 `default` feature.
- We need to add support for $directives in x-format-manifest
* fix qt5 port
* format
* fix compile
* fix tests for canonicalization
* Clean up code
* add error message for nothing to format
* add extra_info field
* add `const X&` overloads for `Object::insert[_or_replace]`
* fix compile
* simple CRs
* add tests
* format
* Fix mosquitto port file
also unmerge a line
* fail the tests on malformed manifest
* fix format_all
* fix coroutine port-version
* format manifests
* Add BasicCommand and VersionCommand
* Add ContactCommand
* test get_available_commands_type_c
* Change get_available_commands_type_c to return objects
* Add TripletCommand & InstallCommand
* Add SetInstalledCommand
* add linking tests
* Add CICommand
* Add remaining *Command objects
* Add tests for commands_type_a
* Move over to using const TripletCommand* for commands_type_a
* Add PathsCommand
* Add SearchCommand
* add test for commands_type_b
* add *Command for all type b commands
* Switch from function pointers to PathsCommand for everything
* format
* rename get_available_commands
also remove CommandType* types
* Rename commands.exportifw.cpp -> export.ifw.cpp
* move DryRun from commands.h -> commands.interface.h
* move vcpkgcmdarguments and vcpkgpaths over to commands.interface.h
* move vcpkg::Commands::BuildExternal -> commands.buildexternal.h
* add commands.*.h for the commands.*.cpp
* move vcpkg::Commands::* to commands.*.h
* move vcpkg::Commands::{Hash,Fetch} to their own files
* change include commands.h -> commands.*.h in commands.*.cpp
* remove commands.*.h from commands.h
* join vcpkg::Commands::* into one namespace line
* fix vcxproj build
* Build fix with MinGW GCC 9.2.0
* Fix MinGW tripplets
Fixes#12065
* clang-format
* Fix unused read_symlink_implementation warning marked as error
read_symlink_implementation was used only in copy_symlink_implementation
when #if defined(_WIN32) && !VCPKG_USE_STD_FILESYSTEM was true.
Removed the warning otherwise.
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
* [vcpkg] Clean up command switch code
Make it more similar to the non-command switch code
* format
* fix the tests
* reformat
* format
* wip
* support x- for command options
* fix autocomplete
* format
* [vcpkg ios] Fix detection of iOS toolchain (#6003)
Added mapping of CMAKE_SYSTEM_NAME == iOS to the bundled iOS toolchain
file.
This fixes the "Unable to determine toolchain to use for
triplet arm64-ios with CMAKE_SYSTEM_NAME iOS" error.
* [vcpkg ios] Set the CMake system processor for the simulator arches (#6003)
So it's consistent for all architectures.
* [vcpkg] Track hashes of cmake script helpers in consuming portfiles
* [vcpkg] Format
* [vcpkg_find_acquire_program] Use cpkg_from_sourceforge for FLEX and BISON
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* [vcpkg] Enable binary caching by default. Support `x-` migration.
Fix passing multiple copies of single parameter arguments.
* [vcpkg] Handle x- prefixes for general arguments
* [vcpkg] Fix#12285 and improve documentation of default binary cache path
* [vcpkg] Revert x- prefix homogenization for per-command arguments
* [vcpkg] Only use accelerated compiler detection for Windows Desktop + Ninja. Improve breadcrumbs for users encountering issues.
* [vcpkg] Fix compiler tracking not pre-downloading Ninja. Fix compiler tracking not looking in -err.log.
* [vcpkg] Update toolsrc/src/vcpkg/binarycaching.cpp
Co-authored-by: Billy O'Neal <bion@microsoft.com>
* [vcpkg] Format
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
this work queue implementation was added at some point, and is no longer used anywhere.
Delete it as not used; if we need it again, we can grab it from the history
* [vcpkg] Move default binary cache from `$root/archives` to user-wide directory
Teach nuget/nugetconfig binary sources to use read/write.
* [vcpkg] Reformat
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
--editable suppresses binary caching and source re-extraction for packages listed on the command line (similar to --head).
This fundamentally changes the port maintenance loop, so several example documents were updated. To avoid users having substantial changes suddenly destroyed by forgetting to pass --editable, "clean" sources have different extract locations.
The undocumented command `build` implies `--editable`.
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This changes our PR builds to treat 'fail' in the ci.baseline.txt as 'skip' instead of using tombstones.
We currently have large numbers of spurious failures that get enshrined in PRs through no fault of a PR author, removing the tombstones concept will fix those by allowing the user to retry. This does mean we accept some risk of not detecting when a port is 'fixed', but that failure is reasonable for us to handle after we see it in CI, but that seems worth it given that it lets us get rid of the tombstone concept.
This also helps out the binary caching feature, because we don't have to figure out how to productize tombstones.
* [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed`.
* [vcpkg] Add end-to-end testing suite for install, remove, and binary caching
* [vcpkg] Define `$TestingRoot in end-to-end-tests.ps1
* [vcpkg] Address CR comments
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* [vcpkg] Upgrade find_acquire_program(NUGET) to 5.5.1. Add partial SHA to temporary download paths to avoid collisions.
* [vcpkg] Fix regression in `vcpkg export --nuget` due to file locking on .vcpkg-root
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
==== Changes Related to manifests ====
* Add the `manifests` feature flag
* This only says whether we look for a `vcpkg.json` in the cwd, not
whether we support parsing manifests (for ports, for example)
* Changes to the manifests RFC
* `"authors"` -> `"maintainers"`
* `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags`
* reserve `"core"` in addition to `"default"`, since that's already
reserved for features
* Add a small helper note about what identifiers must look like
* `<license-string>`: SPDX v3.8 -> v3.9
* `"feature"."description"` is allowed to be an array of strings as well
* `"version"` -> `"version-string"` for forward-compat with versions
RFC
* Add the `--feature-flags` option
* Add the ability to turn off feature flags via passing
`-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags`
* Add CMake toolchain support for manifests
* Requires either:
* a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}`
or `VCPKG_FEATURE_FLAGS`
* Passing the `VCPKG_ENABLE_MANIFESTS` option
* The toolchain will install your packages to
`${VCPKG_MANIFEST_DIR}/vcpkg_installed`.
* Add MSBuild `vcpkg integrate install` support for manifests
* Requires `VcpkgEnableManifest` to be true
* `vcpkg create` creates a port that has a `vcpkg.json` instead of a
`CONTROL`
* argparse, abseil, 3fd, and avisynthplus ports switched to manifest
from CONTROL
* Add support for `--x-manifest-root`, as well as code for finding it if
not passed
* Add support for parsing manifests!
* Add a filesystem lock!
==== Important Changes which are somewhat unrelated to manifests ====
* Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}`
* Add `PlatformExpression` type which takes the place of the old logic
expression
* Split the parsing of platform expressions from checking whether
they're true or not
* Eagerly parse PlatformExpressions as opposed to leaving them as
strings
* Add checking for feature flag consistency
* i.e., if `-binarycaching` is passed, you shouldn't be passing
`--binarysource`
* Add the `Json::Reader` type which, with the help of user-defined
visitors, converts JSON to your internal type
* VcpkgArgParser: place the switch names into a constant as opposed to
using magic constants
* In general update the parsing code so that this ^ works
* Add `Port-Version` fields to CONTROL files
* This replaces the existing practice of
`Version: <my-version>-<port-version>`
==== Smaller changes ====
* small drive-by cleanups to some CMake
* `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` ->
`${CURRENT_INSTALLED_DIR}`
* Remove `-analyze` when compiling with clang-cl, since that's not a
supported flag (vcpkg's build system)
* Add a message about which compiler is detected by vcpkg's build
system machinery
* Fix `Expected::then`
* Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a
`strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`)
* Add `Strings::strto` which converts strings to numeric types
* Support built-in arrays and `StringView` for `Strings::join`
* Add `operator<` and friends to `StringView`
* Add `substr` to `StringView`
* SourceParagraphParser gets some new errors