Commit Graph

1894 Commits

Author SHA1 Message Date
nicole mazzuca
a94f261320
[vcpkg] Initial Registries: Part 2 MVP (#14153)
* [vcpkg wip] start implementation of registries pt. 2

* Remove the `ports` field of `VcpkgPaths`

This is an implementation detail, and so we want to make sure that
it's obvious that this is an internal detail; thus, we add a new function
`builtin_ports_directory()`,
which returns the directory where the builtin ports backing store is.

* continue WIP

* wip

* It works!

* format

* fix some issues

* switch from function static to DelayedInit
* fix lexically_normal for experimental::filesystem

* format

* fix missing include

* add STL notice

* whee error handling

* moar error handling!

* ignore extra files in registries

* formatting

* Billy CRs

* Update toolsrc/include/vcpkg/versiont.h

* fix add_filename test

* fix tests

* remove unused function add_filename
2020-11-09 11:15:31 -08:00
nicole mazzuca
2dce645f2a
[vcpkg] Add a definition for OVERLAY_TRIPLET_ENV (#14436)
This definition is needed in C++14/gcc 6 to compile.
2020-11-06 13:12:26 -08:00
Jared Irwin
5407dcdb00
[vcpkg] Add tab completion for Fish (#14206) 2020-11-02 17:25:43 -08:00
Eric Kilmer
0434ef70ae
[vcpkg] Remove hard-coded ApiKey from nuget push (#14202) 2020-10-29 15:37:46 -07:00
Billy O'Neal
1b1c17de82
[vcpkg baseline] [vs-yasm] Build yasm instead of downloading it to work around memory corruption bugs in yasm itself. (#14003) 2020-10-28 14:26:41 -07:00
Billy O'Neal
09a647a526
Delete use of vcpkg_test_cmake and vcpkg_common_functions. (#13065) 2020-10-28 14:18:07 -07:00
Billy O'Neal
ead8d6bad4
[vcpkg] Fix search for pwsh in vcpkgtools.xml. (#14271) 2020-10-28 01:30:18 -07:00
Billy O'Neal
a6a1722cfa
[vcpkg, jsonnet, openssl-uwp] Enable use of the system powershell-core if it is present. (#13805) 2020-10-27 20:48:14 -07:00
Victor Romero
af9d0701be
[vcpkg] Always use version-string in generator (#14262)
* Always use version-string in generator

* Fix formatting
2020-10-27 14:36:22 -07:00
Victor Romero
e9f8cc67a5
[vcpkg] Implement versions db generator (#13777)
* [vcpkg] Add script to generate ports versions history

* [vcpkg] Fix formatting

* Fetch port versions from commit ID

* Use global --x-json switch

* Use --no-checkout when cloning secondary instance

* Clone from local repository instead of from GitHub

* Use CmdLineBuilder to build git commands

* Use CmdLineBuilder and reduce repeated code

* Fetch version at baseline and code cleanup

* Guess version scheme from old CONTROL files

* Rename version db generator script

* Simplify x-history json output

* Use CONTROL/manifest parsers on x-history

* Use git-tree instaed of commit-id

* Remove 'ports' field from root object

* Clean up code

* More code cleanup

* Improve port version detection

* Improve generator logging

* Do not ignore parsing errors in CONTROL files

* PR review comments in Python script

* Fix subprocess.run() calls

* Make `canonicalize()` return error instead of terminating

* [vcpkg] Add tests for new test_parse_control_file paths

* Remove unnecessary std::move() calls

* Fix formatting

* Python formatting

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-10-26 10:24:30 -07:00
Cengizhan Pasaoglu
2f731d650f
Replace fwd header files to declarations (#13972) 2020-10-24 21:59:05 -07:00
ras0219
291df75125
[vcpkg] Add versions feature flag and version field manifest parsing (#14079)
* [vcpkg] Add `versions` feature flag and version field manifest parsing

* Introduce FeatureFlagSettings struct to more easily access feature flags throughout the program
* To avoid users accidentally starting to write "version" instead of "version-string" in their manifests, vcpkg explicitly detects and prevents usage of ports with schemes other than "String"
* Drive-by fix of copiable SourceControlFileLocation and an exposed use-after-move bug

This code is largely extracted from PR #13777

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>

* [vcpkg] Address CR Comments. Fix test crash on Linux.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
2020-10-21 14:46:48 -07:00
ras0219
d1ba685e97
[vcpkg] Further JSON error improvements (#13399)
* [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>
2020-10-12 10:22:47 -07:00
Cengizhan Pasaoglu
0dcc11ac22
[vcpkg] Use more forward declarations rather than definitions (#13623)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-10-08 22:31:21 -07:00
Billy O'Neal
ab86954093
Always accept = or space as delimiters when parsing common command line parameters. (#13857)
Resolves #11456.
2020-10-07 10:31:42 -07:00
ras0219
d8a4e63690
[vcpkg] Avoid computing triplet ABIs for editable packages (#13446)
* [vcpkg] Avoid computing triplet ABIs for editable packages

* [vcpkg] Address PR comments

* [vcpkg-end-to-end-tests] Add tests for --no-binarycaching, binarycaching by default, and --editable

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-10-06 14:34:59 -07:00
ras0219
8fe1851e1e
[vcpkg] Enable reentrant vcpkg calls (#13751)
* [vcpkg] Enable recursive vcpkg calls

Via envvars VCPKG_COMMAND and VCPKG_X_RECURSIVE_DATA. Child processes can call vcpkg via "$VCPKG_COMMAND <args>" in limited internal circumstances.

* [vcpkg] Address CR comments

* [vcpkg] Do not move through Optional<&> into Optional<T>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-10-06 12:06:26 -07:00
Alexander Neumann
c146787fd3
[vcpkg] fix ci #13790 (#13794)
* [vcpkg] fix ci #13790

* add extra space

* needs ""
2020-09-28 13:58:55 -07:00
Alexander Neumann
0c1c43742d
[vcpkg] add env var VCPKG_OVERLAY_TRIPLETS (#12790)
* [vcpkg] add env var VCPKG_OVERLAY_TRIPLETS

* shorten way to complicated doc

* run clang format

* Apply CR

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

* Apply CR2

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-28 07:51:16 -07:00
Francois Rivard
741c8cbecd
[vcpkg] Add compiler info to nuspec description (#13571)
* Add compiler info to nuspec description

* Run clang-format on some files

* Fix the unit tests

* [vcpkg] Clarify NuGet description to note 'CXX compiler'

* [vcpkg] Fix tests

Co-authored-by: frivard <frivard@coveo.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-27 18:18:27 -07:00
ras0219
ae82a554f8
[vcpkg] Skip all files named .DS_Store, no need to check if the file is regular (#13669) 2020-09-27 17:30:59 -07:00
Pratik Chowdhury
3031f78ddd
[vcpkg] Show Empty Object on vcpkg --list when used with --x-json (#13667)
Thanks to @strega-nil for recommending using Json::stringify over my initial idea of simply printing an empty object

Closes #13637
2020-09-24 11:39:24 -07:00
Billy O'Neal
5d33bd3d79
[vcpkg] Fix the case of current_path() before use on Windows. (#13537)
* Fix the case of current_path() before use on Windows.

This is a better solution than that I tried in https://github.com/microsoft/vcpkg/pull/13144 -- rather than trying to cannoicalize the path completely, which would destroy symlinks etc; this form  calls FindFirstFile on each path element to get the real case from the filesystem.

Fixes #13105.

(Note the wrong case in the CWD in the prompt, but the correct case in all the output:)

PS C:\DeV\vcPKG> .\vcpkg.exe install curl
Computing installation plan...
The following packages will be built and installed:
    curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows
  * zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Starting package 1/2: zlib:x86-windows
Building package zlib[core]:x86-windows...
Using cached binary package: C:\Users\billy\AppData\Local\vcpkg/archives\c6\c61dd1bcc23348934c55f4ced77f1e4b0f353394.zipBuilding package zlib[core]:x86-windows... done
Installing package zlib[core]:x86-windows...
Installing package zlib[core]:x86-windows... done
Elapsed time for package zlib:x86-windows: 62.26 ms
Starting package 2/2: curl:x86-windows
Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows...
Could not locate cached archive: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip
-- Downloading 9d954e49bc.tar.gz...
-- Extracting source C:/Dev/vcpkg/downloads/curl-curl-9d954e49bce3706a9a2efb119ecd05767f0f2a9e.tar.gz
-- Applying patch 0002_fix_uwp.patch
-- Applying patch 0004_nghttp2_staticlib.patch
-- Applying patch 0005_remove_imp_suffix.patch
-- Applying patch 0006_fix_tool_depends.patch
-- Applying patch 0007_disable_tool_export_curl_target.patch
-- Applying patch 0009_fix_openssl_config.patch
-- Applying patch 0010_fix_othertests_cmake.patch
-- Applying patch 0011_fix_static_build.patch
-- Using source at C:/Dev/vcpkg/buildtrees/curl/src/767f0f2a9e-91d24adee1.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/curl-config
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/vcpkg-cmake-wrapper.cmake
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip
Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done
Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows...
Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done
Elapsed time for package curl:x86-windows: 1.299 min

Total elapsed time: 1.33 min

The package curl:x86-windows provides CMake targets:

    find_package(CURL CONFIG REQUIRED)
    target_link_libraries(main PRIVATE CURL::libcurl)

PS C:\DeV\vcPKG>

* Fix *nix builds.

* PR feedback.

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-09-22 20:16:24 -07:00
Billy O'Neal
0890b5a25f
[vcpkg] Add build scripts to produce signed vcpkg binaries. (#13508) 2020-09-21 17:27:35 -07:00
here-mikelley
35d7e4f0b3
[vcpkg] Keep sym links in Linux zip cache files (#13609)
* [vcpkg] Add '-y' to binary caching zip command on non-Windows platforms
2020-09-18 17:02:09 -07:00
ras0219
54a09ff4ef
[vcpkg-docs] Add docs/users/binarycaching.md (#13517)
* [vcpkg-docs] Add docs/users/binarycaching.md

* [vcpkg] Address PR Comments

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-15 18:04:12 -07:00
ras0219
11de106d37
[vcpkg] Add metrics for binarycaching feature (#13486)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-14 15:49:51 -07:00
nicole mazzuca
0fec1340eb
[vcpkg manifest] Add documentation! (#13488)
* [vcpkg docs] add docs for manifest files

These are just for the maintainer docs,
not user docs.

* [vcpkg] EBNF-ify platform expression parsing

this modifies nothing about what strings are accepted or rejected,
it just moves stuff around.

also adds tests.

* [vcpkg docs] add manifest mode example

* [wip] docs for augustin

also fix tabs

* [vcpkg manifest] switch to using maps for features

* Apply suggestions from code review

* un-experimentize format-manifest

* flesh out the user manifest mode docs

* CRs

* billy CRs

* final personal pass-thru
2020-09-14 15:07:02 -07:00
Billy O'Neal
180cae5b6d
Fix boostrap on VS2019. (#13489) 2020-09-11 14:27:41 -07:00
Billy O'Neal
6b97dbfce2
[vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (#13421) 2020-09-11 13:52:18 -07:00
martin-s
e8790f0f1a
[vcpkg] Fix issue #12745. (#12746) 2020-09-11 13:17:47 -07:00
Andrei Lebedev
645f316824
[vcpkg] improve s390x support (#13386)
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2020-09-09 12:28:38 -07:00
ras0219
a35ddddac8
[vcpkg] Fix compilation on VS2015 (#13398)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-07 16:48:46 -07:00
ras0219
0d0a84694c
[vcpkg] Improve Json error messages (#12981)
* [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>
2020-09-07 15:50:20 -07:00
Vitaliy Didik
bfed76d917
[vcpkg] Fixed 'update' command output (#13378) 2020-09-06 11:54:00 -07:00
xyb
fdac1fc5aa
Add community triple arm64-linux and arm-linux. (#11880)
Verify the following command on both 32 bits and 64 bits OS on Raspberry pi 3.

    ./bootstrap-vcpkg.sh
    ./vcpkg install boost
2020-09-05 10:45:48 -07:00
dan-shaw
bd8af07898
[vcpkg] json format for search (#12509) 2020-09-05 07:35:40 -07:00
nicole mazzuca
4467eb334a
fix compile on g++ 6 (#13290) 2020-09-04 11:49:56 -07:00
ras0219
13f5a3d615
[vcpkg] Delay failures in vcpkg install until missing manifest requested (#13231) 2020-09-03 11:53:26 -07:00
nicole mazzuca
9740611cab
[vcpkg] Registries MVP (#13038) 2020-09-02 09:13:44 -07:00
ras0219
a0536798ee
[vcpkg] Implement 'repository' tag for NuGet binary caching (#13228)
This tag is required to correctly interface with GitHub Packages, because GHP shares a single remote for the entire organization and uses the repository field to associate a package with a particular repository.

This tag will be automatically generated if the default GitHub Actions environment variables are present (GITHUB_XYZ) or if the user defines VCPKG_NUGET_REPOSITORY.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-31 22:37:10 -07:00
nicole mazzuca
dea7d758c6
[vcpkg] Fix upgrade for port-version (#13069)
Co-authored-by: Billy Robert O'Neal <bion@microsoft.com>
2020-08-25 15:08:25 -07:00
Billy O'Neal
64cbded18e
[vcpkg] Fix #13094 by avoiding the comma operator. (#13117)
* Fix #13094 by avoiding the comma operator.

Drive-by remove unused parenthesis and remove macro inversion in metrics.cpp.
2020-08-25 14:49:27 -07:00
huahang
99b07566f4
[vcpkg] Fix build on old compilers. (#12950) 2020-08-24 18:14:38 -07:00
ras0219
5d331ed553
[vcpkg] Fix editable bug (#12910) 2020-08-22 01:27:40 -07:00
Phoebe
f6948aeb68
[vcpkg] fix hint message (#13043) 2020-08-20 22:44:42 -07:00
nicole mazzuca
dfa7dc4276
remove registries.h and fwd/registries.h... (#13017) 2020-08-19 21:12:55 -07:00
Phoebe
680b2928a1
[vcpkg] Update hint message (#12976) 2020-08-19 17:34:43 -07:00
nicole mazzuca
5e164e3dd2
[vcpkg] Add Forward Declarations (originally by @cngzhnp) (#12985)
Co-authored-by: cngzhnp <cengizhanpasaoglu@gmail.com>
2020-08-19 15:33:15 -07:00
Jack·Boos·Yu
0bb8780a60
[vcpkg] Use std::filesystem when Visual Studio is greater than 2015 (#12774)
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-08-18 09:23:01 -07:00