aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
AgeCommit message (Collapse)Author
2020-07-09[vcpkg] Move default binary cache from `$root/archives` to user-wide ↵ras0219
directory (#12256) * [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>
2020-07-09[vcpkg manifests] fix some issues (#12227)nicole mazzuca
Fixes #12190 Fixes #12208 Fixes #12234 Fixes #12286 Fixes #12315 Fixes #12186 Fixes #12331 Fixes googleapis/google-cloud-cpp#4487
2020-07-07[vcpkg] Implement --editable (#12200)ras0219
--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>
2020-07-06[vcpkg] Format the C++ in CI (#11655)nicole mazzuca
* [vcpkg] Format the C++ in the CI * format the C++ * CR
2020-07-06[vcpkg] Remove use of std::variant and std::visit to fix VS2015. (#12242)ras0219
Fixes #12220 Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-02[vcpkg] Remove the tombstones and 'ignore' baseline concepts. (#12197)Billy O'Neal
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.
2020-07-01[vcpkg] Remove all uses of Foo::Foo() noexcept = default; to fix #9955 (#12201)ras0219
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-01[vcpkg] Enable NuGet-based binary caching via mono (#12170)ras0219
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-01[vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and ↵ras0219
`x-set-installed` (#12138) * [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>
2020-06-30[vcpkg] Fix `vcpkg export --nuget` regressions (#12174)ras0219
* [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>
2020-06-30[vcpkg manifest] Manifest Implementation (#11757)nicole mazzuca
==== 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
2020-06-26[vcpkg] Delete unused --purge-tombstones and introduce BufferedPrint class ↵Billy O'Neal
(#12049) * Introduce buffered_print class to manage buffered write patterns like in the ci command. * Remove --purge-tombstones option. * Law of demeter. * Make buffered_print imobile. * buffered_print => BufferedPrint * Fix merge conflict.
2020-06-26[vcpkg] Implementation of --x-binarysource=nuget (and friends) (#12058)ras0219
* [vcpkg] Initial implementation of --x-binarysource=nuget * [vcpkg] Remove double-double quoting of CMake arguments * [vcpkg] Update nuget.exe to 5.5.1 to support Azure DevOps Artifacts * [vcpkg] Enable batching of NuGet server calls with prefetch(). Add `interactive` binarysource. * [vcpkg] Add `nugetconfig` binary source * [vcpkg] Short circuit querying remote NuGet servers once all refs are found * [vcpkg] Add experimental help for binary caching * [vcpkg] Improved NuGet cache package descriptions and version formatting * [vcpkg] Rename `CmdLineBuilder::build()` to extract() * [vcpkg-help] Ascii-betize help topics * [vcpkg] Add tests for cmdlinebuilder. Improve handling of quotes and slashes. * [vcpkg] Addressing code review comments * [vcpkg] Add tests for vcpkg::reformat_version() * [vcpkg] Added test for vcpkg::generate_nuspec() * [vcpkg] Add tests for vcpkg::XmlSerializer * [vcpkg] Addressed code review comment * [vcpkg] Add test for vcpkg::Strings::find_first_of * [vcpkg] Fix machine-specific paths in test for vcpkg::generate_nuspec() Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26[vcpkg] Use XDG/LOCALAPPDATA for default binary caching path (#12091)ras0219
* [vcpkg] Use XDG Base Directory Specification on non-Windows * [vcpkg] Move user-wide binary cache on Windows to $LOCALAPPDATA/vcpkg/archives * [vcpkg] Address code review comments; refactor other uses of LOCALAPPDATA * [vcpkg] Address code review comments * [vcpkg] filesystem::path::append() accepts string arguments, not paths. Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-25[vcpkg build] fix build command (#12072)nicole mazzuca
2020-06-22[vcpkg] Track compiler information in ABI (#11654)ras0219
* [vcpkg] Refactor out abi_tags_from_pre_build_info() * [vcpkg] Track Windows toolchain file in triplet hash * [vcpkg] Improve error messages when constructing PreBuildInfo * [vcpkg] Extract InstallPlanAction::BuildAbiInfo * [vcpkg] Extract Build::EnvCache and private-impl VcpkgPaths * [vcpkg] Enable compiler hash detection when binarycaching is enabled * [vcpkg] Downgrade warning about missing ABI keys When binarycaching is not enabled, this warning is spurious and provides no user value. * [vcpkg] Cleanup * [vcpkg] Refactor compiler tracking into triplet abi computation Move several static global caches into VcpkgPaths/EnvCache. Add feature flag 'compilertracking' to enable the new feature. * [vcpkg] Refactor out PreBuildInfo::using_vcvars() Move VcpkgTripletVar into build.cpp because it is not used outside that file. * [vcpkg] Address some code analysis warnings Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-17[vcpkg] Fix issue #9781 by exporting from the installed directory (#11015)ras0219
* [vcpkg] Fix issue #9781 by exporting from the installed directory * [vcpkg] Address code review comments for #11015 * [vcpkg] Remove duplicate triplet in installed path from exports Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-16[vcpkg] Fix create by extracting common paths settings (#11842)Billy O'Neal
Resolves #11784
2020-06-15[vcpkg] Delete g_binary_caching global that should be passed as a parameter. ↵Billy O'Neal
(#11958)
2020-06-15[vcpkg] Add vcpkg item to project settings in Visual Studio (#4361)Alexander Neumann
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-03[vcpkg] Allow CI to pass in all relevant directories and remove use of ↵Billy O'Neal
symbolic links (#11483)
2020-05-29[vcpkg metrics] Allow someone to opt out after build (#11542)nicole mazzuca
* [vcpkg metrics] start using json library Additionally, add floats to the JSON library since they're required. * [vcpkg metrics] allow users to disable metrics after the build Additionally, as a drive by, fix UUID generation * fix metrics data * code review
2020-05-27[vcpkg] Move CI cleaning back out of the 'ci' command into a separate ↵Billy O'Neal
command to restore cross-compilation preinstalls. (#11545)
2020-05-20[vcpkg] fix extern C around ctermid (#11343)nicole mazzuca
Additionally, move the system_header invocations to their own header file, <vcpkg/base/system_header.h>
2020-05-19[vcpkg] Optimize string split slightly. (#11433)Billy O'Neal
2020-05-19[vcpkg] Harden file removals and clean directory contents in "CI" inside ↵Billy O'Neal
vcpkg itself. (#11432) `files.h/files.cpp`: * Add end and else comments to all macros. * Add "remove_all_inside" function which empties a directory without actually deleting the directory. This is necessary to handle the case where the directory is actually a directory symlink. * Change remove_all to use std::remove when VCPKG_USE_STD_FILESYSTEM is set; this will engage POSIX delete support available on current Win10. `commands.ci.cpp`: empty "installed". `*/initialize_environment.*`: No longer clean the directories outside the tool. `ci-step.ps1`: Remove unused console output tee-ing.
2020-05-14[vcpkg] Turn on tests and PREfast in CI, and fix tests to pass. (#11239)Billy O'Neal
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-08[vcpkg] Resolve relative overlay ports to the current working directory. ↵Robert Schumacher
(#11233) Fixes #10771.
2020-04-29[vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (#10476)Robert Schumacher
* [vcpkg] Add support for VCPKG_BINARY_SOURCES and --binarysource=<> * [vcpkg] Rename --binarysource to --x-binarysource to denote internal/experimental * [vcpkg] Address review comments & add tests for BinaryConfigParser * [vcpkg] Replace do {} while(1); with for(;;) Avoids conditional expresion is constant warnings * [vcpkg] Invert if/else * [vcpkg] Fix warning in export.prefab.cpp * [vcpkg] Resolve merge regressions
2020-04-17[vcpkg] Add initial JSON support (#10521)nicole mazzuca
* [vcpkg] Add initial JSON support This adds a JSON parser, as well as the amount of unicode support required for JSON parsing to work according to the specification. In the future, I hope to rewrite our existing XML files into JSON. Additionally, as a drive-by, we've added the following: * add /wd4800 to pragmas.h -- this is a "performance warning", for when you implicitly convert pointers or integers to bool, and shouldn't be an issue for us. * Switched Parse::ParserBase to read unicode (as utf-8), as opposed to ASCII * Building again under VCPKG_DEVELOPMENT_WARNINGS, yay!
2020-04-17[vcpkg] Add x-set-installed command (#10817)nicole mazzuca
This command takes a list of ports, and causes the final state of the installed directory to be as-if one ran the install on an empty installed directory (removing any unnecessary packages). This is especially useful with the new `--x-install-root` option, which allows one to set the `installed` directory for vcpkg to use. Additionally, as a drive-by, we do some `stdfs` clean-up and add a `.is_feature()` member function to BinaryParagraph (as opposed to checking for `.feature().empty()`, which is far less clear to read). This feature is experimental.
2020-04-14[vcpkg] Clean up CMake build system (#10834)nicole mazzuca
There are quite a few changes to the CMake build system packaged up into one set here: * Added `toolsrc/cmake/utilities.cmake`, which contains the following: * `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one of {gcc, clang, msvc} * `vcpkg_detect_standard_library` -- get the name of the standard library we're linking to, as one of {libstdc++, libc++, msvc-stl} * `vcpkg_detect_std_filesystem` -- figure out how to link and call into C++17's filesystem; whether one needs to link to `stdc++fs` or `c++fs`, and whether to use `<filesystem>` or `<experimental/filesystem>`. * Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from `VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development warnings without passing -Werror * Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the former will now print a deprecation message and set the latter. * Now, print a deprecation message on `WERROR`; it doesn't do anything since the behavior it requested is now the default. * Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z` * Do some code movement * Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW * Renamed to `VCPKG_USE_STD_FILESYSTEM` Additionally, we now pass `/W4` in Debug mode on x86 in the Visual Studio build system; this brings it in line with the CMake build system, and the x64 Visual Studio build system. And finally, we make some minor code changes to support compiling in VCPKG_DEVELOPMENT_WARNINGS mode.
2020-04-09[vcpkg] New policy: SKIP_ARCHITECTURE_CHECK. (#10398)Alexander Neumann
* New policy: SKIP_DLL_ARCHITECTURE_CHECK. The check only works if MS link.exe is used otherwise the second linker member is missing (according to the observed errors) * rename to VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK since the dll check was ok but the lib check was failing. * fix indentation * move the if to a better position.
2020-04-09[vcpkg] Correct UInt128 code 😇 (#10583)nicole mazzuca
* [vcpkg] Correct UInt128 code 😇 `UInt128::operator<<(x, y)` should clear the bottom 64 bits of `x` if `y >= 64`; however, we don't do this, and so we duplicate `x`'s bottom bits into `x.top` instead of moving them. Similarly, we have the opposite problem for `UInt128::operator>>`. This commit fixes these latent bugs, which we weren't hitting because the thing we use them for never actually shifts more than 64 bits.
2020-04-06Android Support: Exporting to Android Archive (AAR) (#10271)atkawa7
* added android triplets * added android support to vcpkg * added export directories to git ignore * fix libraries naming * added vckpg sources to visual studio project files * rename file location * issue with std::string fs:path copy initialization * format path on VStudio * fix checks format cannot work on fs::path * support header only libraries * support using architecture instead of triplets * added prefab support * added debug logs and prefab debug flag * added support for empty packages i.e openssl
2020-03-27[vcpkg] Add the possibility to load vcvars.bat with external toolchain. ↵Alexander Neumann
(#10399) * Add VCPKG_LOAD_VCVARS_ENV allow loading vcvars.bat if an external toolchain file is used. * add documentation
2020-03-25[vcpkg] Improve common case of ignoring filesystem errors (#10557)Robert Schumacher
2020-03-25[vcpkg-help] Reflow and small cleanups (#10477)Robert Schumacher
2020-03-19Merge pull request #10372 from ras0219-msft/dev/roschuma/jobsRobert Schumacher
[vcpkg] Introduce Job Objects to improve ctrl-c performance on Windows
2020-03-19Merge pull request #10032 from ras0219-msft/dev/roschuma/compute-all-abisRobert Schumacher
[vcpkg] Compute ABIs upfront instead of just-in-time
2020-03-18[vcpkg] Use enum class for RestoreResultRobert Schumacher
2020-03-10Implement a warning when running vcpkg inside a developer command prompt if ↵Billy Robert O'Neal III
the set of packages to install all target a different architecture than the prompt.
2020-03-10[vcpkg] Introduce Job Objects to improve ctrl-c performance on WindowsRobert Schumacher
2020-03-09Merge remote-tracking branch 'origin/master' into HEADRobert Schumacher
2020-02-24[vcpkg] Fix issue #9916; `vcpkg upgrade` did not `load_tag_vars()` (#10202)Robert Schumacher
2020-02-19Fix build for VS2015 (#10126)Victor Romero
* Add missing constructors for TexRowCol required by VS2015 * Make TextRowCol() constexpr and noexcept
2020-02-12[vcpkg] Fix VS2015 compileRobert Schumacher
2020-02-11[vcpkg] Compute all ABIs upfront instead of during build_package()Robert Schumacher
2020-02-11[vcpkg] Extract binary caching functionality into separate interfaceRobert Schumacher
2020-02-09[vcpkg] Remove superfluous BuildPackageConfig struct (#9997)Robert Schumacher
BuildPackageConfig held essentially the same information as InstallPlanAction, so deduplicate