Граф коммитов

94 Коммитов

Автор SHA1 Сообщение Дата
Billy O'Neal a35ce804e1
[z-applocal] Reduce nonexistent and non-PE files to warnings. (#1274) 2023-11-20 17:11:21 -08:00
Billy O'Neal 82a7c96db2
Clarify BuildInfo::version's purpose. (#1261)
* Add test case for the recording head version feature noted in https://github.com/microsoft/vcpkg-tool/pull/1259#discussion_r1378120355

* Sanitize detected head versions to make sure they are at least version-strings.
2023-11-03 16:06:51 -07:00
autoantwort f07df71f42
vcpkg add port: Handle feature core. (#1163) 2023-10-30 18:09:52 -07:00
Billy O'Neal 43c47e8c8d
Use ports-root and registry-versions git repos. (#1241)
* Use the git repo of --x-builtin-ports-root and --x-builtin-registry-versions-dir when talking about port commit shas and version tree shas, respectively.

I believe this is necessary to make the instructions in https://learn.microsoft.com/vcpkg/produce/publish-to-a-git-registry#4---update-the-versions-database actually work.

This also reduces the number of things that assume VCPKG_ROOT is a git repo. (Since it is not when we are shipped in VS or acquired with the one liner)
2023-10-24 16:50:49 -07:00
Billy O'Neal bad6195742
Don't inherit the same handle more than once. (#1234) 2023-10-18 12:22:56 -07:00
Billy O'Neal 9601b79102
Fix edit command. (#1221) 2023-10-05 20:22:51 -07:00
Billy O'Neal e6c0307088
Make help be consistent. (#1169)
* Add name, synopsis, and example information to CommandMetadata.
* Clean up needing to make thunks for all help text in command metadata machinery.
* Power autocomplete and help with the same tables that power command lookup. Resolves this line item first discovered in https://github.com/microsoft/vcpkg-tool/pull/1164
* Improve help by printing synopsis and grouped examples powered by CommandMetadata.
* Update the main usage to make sure every relevant command is included.
* Add website link to all help commands.
* split rarely used and artifacts into separate `vcpkg help commands` from @ras0219-msft
* make tense for all synopsis and argument help text consistent from @ras0219-msft
* burninate 'instead of' and 'writes out'
* Deduplicate the all commands help topic and remove 'vcpkg' from 'vcpkg help blah'.
2023-09-06 23:55:19 -07:00
Billy O'Neal 51dfe0f4d3
Change the default triplet to the same as the host triplet on Windows. (#1180)
This removes the 'in September 2023' message and does what the message said we would do. For the next 6 months we'll warn that the behavior changed.

The specific change to triplet.cpp to change the triplet setting is from https://github.com/microsoft/vcpkg-tool/pull/640

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
2023-09-06 16:57:32 -07:00
Billy O'Neal 6b2f36a769
Fix integrate to always know its subcommands. (#1161) 2023-08-22 17:27:11 -07:00
autoantwort 47a03cc552
Ci: Detect not needed entries in ci.baseline.txt (#1111) 2023-08-11 21:14:56 -07:00
Javier Matos Denizac c94e4034e9
[Export Command] Enabling Manifest Mode (#1136)
* initial implementation

* avoid value or exit and reuse MissinOption message

* improve messaging

* reduce redundancy

* add end2end test file

* add test cases for raw based exports in manifest mode
2023-08-10 13:06:37 -07:00
Javier Matos Denizac be8125a13c
Add z-extract command / artifacts uses z-extract (#1039)
* Make commands physical design consistent.

In the vcpkg technical review meeting today we said:
* We want commands.Xxx.cpp for every "vcpkg Xxx" subcommand, rather than Xxx.cpp.
* We want x- commands to not have the x in their code names or x- in their file names, and z- commands have the z in their code names and z- in their file names.
* Command cpps have dashes.

Drive by fixes as part of this audit:
* FooCommand structs are gone, all users were stateless and are better served by plain function pointers. This also allows the command tables to be constexpr.
* commands.interface.h is dead, as it only existed to declare those structs that are dead.

Future changes:
* I really want all the Commands::Xxx and the commands namespace itself to go away. But ran out of time to sell this to the team.
  * Xxx::COMMAND_STRUCTURE => XxxCommandMetadata
  * Xxx::perform_and_exit => xxx_command_and_exit

Notes:build, install, and export probably deserve to have functionality split out, but that would probably be intricate so I have not attempted to do it here.
export.*.cpp seem like they *really* shouldn't be separate .cpps.

* Missed some _command s.

* wip

* wip

* format

* minimal impl

* add .xz

* Add help text for command

* vcpkg-artifacts uses x-extract

* format

* oops

* x-extract -> z-extract

* rename extract_archive_to_empty -> extract_archive and rename the old extract_archive to set_directory_to_archive_content

* fix comment

* wip

* add strip setting

* add strip option localized message

* format

* wip

* Add testing for strip mapping

* add --extract-type option to bypass file extension detection

* format

* wip

* test

* wip

* wip

* wip

* forward slash delim for non-windows

* wip

* try again

* maybe fix paths for non-windows

* use generic_Xxx

* use + instead of /

* convert back to path

* use appropriate path separators in test

* set VCPKG_COMMAND env variable

* set VCPKG_COMMAND

* set VCPKG_COMMAND in yaml

* wip

* use matrix.preset

* remove archive unit test from artifacts

* debug

* const everything

* create destination if it does not exist

* use fsPath instead

* bug fixes and remove installers

* fix end-to-end check

* wip

* wip

* debug messages

* fix strip for macos and linux

* print output

* wip

* cleanup

* format

* rename to command_extract_and_exit as per convention

* response to feedback

* remove the extract-type option and just fall back to cmake

* fix strip_map to proper behavior, better temp dir handling, etc

* fix unit tests

* for real this time

* wip

* wip

* reuse logic for is_slash functionality

* oops

* testing

* test

* testing

* verify problem

* try this

* fix

* use Strings::strto<int> instead of std::stoi

* add AUTO option + unit test

* add strip=AUTO

* switch artifacts to use strip=AUTO

* format

* cleanup

* fix compiler warnings

* fix conversion

* format

* remove magic -1, respond to feedback, format

* update localized messages

* add e2e

* test executable bits on non-windows

* oops

* better naming

* try this

* update end2end

* for real this time

* verify file exists

* print UnixMode

* oops

* fix indentation

* look for the right unixMode

* Simplify tests.

* Delete unreferenced test assets, add archive start events back.

* remove = from #define

* format

* minor fix

* Fix casing for enum class

* rename strip_map and get_common_prefix_count and add minimum documentation

* wip

* missed a couple renames

* rename test folder from "archive" to "folder0"

* remove then from artifact caller

* some structural changes

* enforce relationship between stripMode and stripCount

* use files is_slash

* check strip option is >=0

* format

* minor refactoring

* remove empty entries from get_archive_deploy_operations

* minor refactor

* adds testing for guess_extraction_type and get_strip_setting

* add testing for get_strip_setting

* minor feedback

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-07-31 15:54:26 -07:00
Billy O'Neal 7873dc4e91
Remove the vcpkg-find-acquire-program test port. (#1130)
Hopefully resolves test failures in https://github.com/microsoft/vcpkg-tool/pull/1129 -- asset caching is not turned on in the tool repo so testing things that need lots of external servers is problematic.

This was added back when the tool and registry were in the same repo in attempt to validate *registry* changes, not tool changes. As a result it doesn't really belong here.

The one thing that might also have been tested here is handling of old CONTROL files ports so I added an explicit test port for that.
2023-07-17 13:45:41 -07:00
Billy O'Neal 9e585de2fe
Rename e2e tests with -s rather than _s. (#1108) 2023-07-10 07:44:19 -07:00
Billy O'Neal 0b63e37a0f
Allow vcpkg remove, vcpkg export, etc. without overlays. (#1110) 2023-07-07 17:59:45 -04:00
Billy O'Neal d89474b12f
Allow overrides to select ports that aren't in the baseline. (#1109)
* Add an e2e test for removed-from-baseline ports.

* Rename patterns.ps1 to e2e-registry.ps1, to reflect that there are
  tests for more than just patterns now.
* Add removed.json.in and a call to it.

See also https://github.com/microsoft/vcpkg-tool/pull/1108 which
fixes all the e2e infrastructure to consistently use -s.

* Actually fix the bug: anything accepting both an ActionPlan and a PortFileProvider is suspect. In this case it was:

```
        void load_tag_vars(const ActionPlan& action_plan,
                           const PortFileProvider& port_provider,
                           Triplet host_triplet) const;
```

Fix that by just pushing the ActionPlan part down to the underlying virtual load_tag_vars.
2023-06-23 15:54:41 -07:00
Billy O'Neal f19f3d9939
Ensure package_dir is always filled in. (#1103)
Resolves https://github.com/microsoft/vcpkg/issues/31908

In https://github.com/microsoft/vcpkg-tool/pull/1040 , create_feature_install_plan and create_versioned_install_plan were fixed, but not create_upgrade_plan.

Make this bug structurally impossible by making the FooAction ctors that fill in m_scfl also fill in package_dir.
2023-06-22 12:36:39 -07:00
Billy O'Neal add000ac05
Fix end to end tests writing into the source tree. (#1106)
* Fix overlays test writing to the source tree.

* Fix patterns test writing into the source tree.
2023-06-22 12:36:12 -07:00
Billy O'Neal 7e3b1a79a9
Repair z-applocal test bugs. (#1105)
* Repair z-applocal test bugs.

* We accidentally checked in main.exe rather than main.cpp. Compiling main.cpp failed, but the test 'passed' because main.exe was already present.
* We never checked the output to see that vcpkg thought it actually deployed anything.
* We didn't actually test anything because we built the DLLs to be copied in the same location as the exe, so there was nothing to do.
* We wrote to the source tree.

* Also make deploying plugins from 'debug' bin dirs correct.
2023-06-22 12:36:00 -07:00
Billy O'Neal ba2644f0a7
Turn off autocrlf in format-manifest test. (#1074)
* Turn off autocrlf in format-manifest test.

Resolves output like

2023-05-18T00:52:19.4251966Z warning: in the working copy of '3fd/vcpkg.json', LF will be replaced by CRLF the next time Git touches it
2023-05-18T00:52:19.4372050Z warning: in the working copy of '7zip/vcpkg.json', LF will be replaced by CRLF the next time Git touches it
2023-05-18T00:52:19.4386085Z warning: in the working copy of 'ableton-link/vcpkg.json', LF will be replaced by CRLF the next time Git touches it
2023-05-18T00:52:19.4398373Z warning: in the working copy of 'ableton/vcpkg.json', LF will be replaced by CRLF the next time Git touches it
2023-05-18T00:52:19.4410932Z warning: in the working copy of 'abseil/vcpkg.json', LF will be replaced by CRLF the next time Git touches it
2023-05-18T00:52:19.4422736Z warning: in the working copy of 'absent/vcpkg.json', LF will be replaced by CRLF the next time Git touches it

in Actions output. Example: https://github.com/microsoft/vcpkg-tool/actions/runs/5008981073/jobs/8977401326
2023-05-22 12:04:47 -07:00
Billy O'Neal 04ef202b2c
Replace aka.ms with direct links. (#1071)
* Replace aka.ms with direct links.

* format
2023-05-18 11:01:04 -07:00
Billy O'Neal 123d66de41
Add x-update-registry command. (#1053)
* Add x-update-registry command.

Docs submitted as https://github.com/microsoft/vcpkg-docs/pull/79

* Actually implement --all.

* Get rid of the _UpdatingRegistryDataFrom$.comment edit.
2023-05-08 11:37:21 -07:00
Billy O'Neal 290784fd33
Restore activating message when no postscript is present. (#1046)
* Restore activating message when no postscript is present.

Resolves https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1780139/

* Add linux-with-artifacts preset.

* fixup linux artifacts preset

* Actually fix Linux and Mac.

* format
2023-05-03 12:15:39 -07:00
Javier Matos Denizac 0390b43af9
x-update-baseline should not make overlay-triplet paths absolute (#1029)
* use fmap instead of util::transform to keep original config in tact.

* formatting

* add test case to overlays end-to-end

* -IfNotEqual is not a thing :)

* probably best not to sort paths :)

* no need to convert to strings
2023-04-19 11:54:43 -07:00
Billy O'Neal 823c16ece7
Don't emit the triplet warning with x-set-installed no args. (#1006)
* Don't emit the triplet warning with x-set-installed no args.

Also added e2e tests.

* clang-format

* Add purpose specific unit tests, including a new test for platform qualified expressions.

* Add end to end test for the environment variable being set not emitting the warning.
2023-04-06 11:00:13 -07:00
Billy O'Neal 1cfb4350ea
Fix activate + use + activate unstacking with "combined" environment variables. (#954)
* Add a test to detect the problem that occurred in the demo of use stacking this morning.

Repro pseudocode:

vcpkg new
vcpkg add artifact gcc
vcpkg activate
vcpkg use cmake
vcpkg activate
assert(Get-Command cmake) -eq $null

* Delete unused Activation.getEnvironmentBlock()

* Reorder "deactivate" of the environment to happen at the beginning of activation rather than the end, so that replacements aren't dependent on whether activation happens or not.

* Extract writePostscript.

* clang-format
2023-03-16 16:43:39 -07:00
Billy O'Neal a333c87dba
Allow use to stack on use and activate, but not vice versa. (#944)
* Allow use to stack on use and activate, but not vice versa.

Resolves https://github.com/microsoft/vcpkg/issues/29978

Also adds the ability to e2e test any artifacts things.
Also gets rid of duplicate definition of Record.
Also removes meaningless --project switch from deactivate.
Also localizes error and warning in artifacts messages.
Also warns if the user ran just the exe and we're doing something that needs the postscript file.
Also applies changes from vcpkg-init.ps1 to vcpkg-in-development.ps1.
2023-03-09 14:25:53 -08:00
Billy O'Neal dbc4a343e0
Install successful installs even with --only-downloads. (#901)
* Install successful installs even with --only-downloads.

Drive-by: Make set-installed accept --only-downloads.

"Download only" mode works by marking execute_process and friends to fail instantly when a port is run, and we just hope the `vcpkg_from_Xxx` is reached before that failure happens. Then, we didn't install the result, even if it "succeeded".

This failed for ports which put their "get" operation into a helper port, since the helper cmake script dependent ports were expecting to use was unavailable.

Before:

```
PS C:\Dev\vcpkg> .\vcpkg.exe install ignition-math4 --only-downloads
Computing installation plan...
The following packages will be built and installed:
  * ignition-cmake0[core]:x86-windows -> 0.6.2#4
    ignition-math4[core]:x86-windows -> 4.0.0#3
  * ignition-modularscripts[core]:x64-windows -> 2022-05-11#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Detecting compiler hash for triplet x86-windows...
Installing 1/3 ignition-modularscripts:x64-windows...
Building ignition-modularscripts[core]:x64-windows...
-- Installing: C:/Dev/vcpkg/packages/ignition-modularscripts_x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake
Downloaded sources for ignition-modularscripts[core]:x64-windows
Elapsed time to handle ignition-modularscripts:x64-windows: 51.88 ms
Installing 2/3 ignition-cmake0:x86-windows...
Building ignition-cmake0[core]:x86-windows...
CMake Error at ports/ignition-cmake0/portfile.cmake:3 (ignition_modular_library):
  Unknown CMake command "ignition_modular_library".
Call Stack (most recent call first):
  scripts/ports.cmake:147 (include)

Downloaded sources for ignition-cmake0[core]:x86-windows
Elapsed time to handle ignition-cmake0:x86-windows: 43.37 ms
Installing 3/3 ignition-math4:x86-windows...
Building ignition-math4[core]:x86-windows...
CMake Error at ports/ignition-math4/portfile.cmake:1 (ignition_modular_library):
  Unknown CMake command "ignition_modular_library".
Call Stack (most recent call first):
  scripts/ports.cmake:147 (include)

Downloaded sources for ignition-math4[core]:x86-windows
Elapsed time to handle ignition-math4:x86-windows: 43.78 ms
Total install time: 4.206 s
RESULTS
    ignition-modularscripts:x64-windows: DOWNLOADED: 51.88 ms
    ignition-cmake0:x86-windows: DOWNLOADED: 43.37 ms
    ignition-math4:x86-windows: DOWNLOADED: 43.78 ms

SUMMARY FOR x64-windows
    DOWNLOADED: 1
SUMMARY FOR x86-windows
    DOWNLOADED: 2
PS C:\Dev\vcpkg>
```

After:
```
PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\x64-Debug\vcpkg.exe install ignition-math4 --only-downloads
Computing installation plan...
The following packages will be built and installed:
  * ignition-cmake0[core]:x86-windows -> 0.6.2#4
    ignition-math4[core]:x86-windows -> 4.0.0#3
  * ignition-modularscripts[core]:x64-windows -> 2022-05-11#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Detecting compiler hash for triplet x86-windows...
Installing 1/3 ignition-modularscripts:x64-windows...
Building ignition-modularscripts[core]:x64-windows...
-- Installing: C:/Dev/vcpkg/packages/ignition-modularscripts_x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake
-- Performing post-build validation
Elapsed time to handle ignition-modularscripts:x64-windows: 63.08 ms
Installing 2/3 ignition-cmake0:x86-windows...
Building ignition-cmake0[core]:x86-windows...
-- Downloading https://github.com/ignitionrobotics/ign-cmake/archive/ignition-cmake_0.6.1.tar.gz -> ignitionrobotics-ign-cmake-ignition-cmake_0.6.1-1.tar.gz...
-- Extracting source C:/Dev/vcpkg/downloads/ignitionrobotics-ign-cmake-ignition-cmake_0.6.1-1.tar.gz
-- Applying patch do-not-compile-gtest.patch
-- Applying patch support-arm64.patch
-- Applying patch uuid-do-not-require-pkg-config.patch
-- Applying patch fix-find-ign-curl.patch
-- Using source at C:/Dev/vcpkg/buildtrees/ignition-cmake0/src/make_0.6.1-6417790457.clean
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at C:/Dev/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Found external ninja('1.11.0').
-- Configuring x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:23 (message):
  This command cannot be executed in Download Mode.

  Halting portfile execution.

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:326 (vcpkg_execute_required_process)
  installed/x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake:8 (vcpkg_configure_cmake)
  installed/x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake:160 (ignition_modular_build_library)
  ports/ignition-cmake0/portfile.cmake:3 (ignition_modular_library)
  scripts/ports.cmake:147 (include)

Downloaded sources for ignition-cmake0[core]:x86-windows
Elapsed time to handle ignition-cmake0:x86-windows: 1.004 s
Installing 3/3 ignition-math4:x86-windows...
Building ignition-math4[core]:x86-windows...
-- Downloading https://github.com/ignitionrobotics/ign-math/archive/ignition-math4_4.0.0.tar.gz -> ignitionrobotics-ign-math-ignition-math4_4.0.0-1.tar.gz...
-- Extracting source C:/Dev/vcpkg/downloads/ignitionrobotics-ign-math-ignition-math4_4.0.0-1.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/ignition-math4/src/ath4_4.0.0-89bdbdf369.clean
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at C:/Dev/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Found external ninja('1.11.0').
-- Configuring x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:23 (message):
  This command cannot be executed in Download Mode.

  Halting portfile execution.

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:326 (vcpkg_execute_required_process)
  installed/x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake:8 (vcpkg_configure_cmake)
  installed/x64-windows/share/ignition-modularscripts/vcpkg-port-config.cmake:160 (ignition_modular_build_library)
  ports/ignition-math4/portfile.cmake:1 (ignition_modular_library)
  scripts/ports.cmake:147 (include)

Downloaded sources for ignition-math4[core]:x86-windows
Elapsed time to handle ignition-math4:x86-windows: 965.5 ms
Total install time: 5.452 s
RESULTS
    ignition-modularscripts:x64-windows: SUCCEEDED: 63.08 ms
    ignition-cmake0:x86-windows: DOWNLOADED: 1.004 s
    ignition-math4:x86-windows: DOWNLOADED: 965.5 ms

SUMMARY FOR x64-windows
    SUCCEEDED: 1
SUMMARY FOR x86-windows
    DOWNLOADED: 2
PS C:\Dev\vcpkg>
```

Observe that in the before we failed to download the sources of ignition-cmake0 and ignition-math4.

* Delete StringMetric::BuildError because it was leaking unhashed port names.

* Deduplicate the call to do_build_package_and_clean_buildtrees.
2023-03-07 11:46:20 -08:00
Billy O'Neal ce53136e87
Disable metrics when the user is not opted in to Visual Studio telemetry when vcpkg is deployed with Visual Studio. (#931)
This required moving the bundleconfig to "next to the .exe" rather than "within vcpkg_root", and corresponding test changes, since we need to know information out of the bundle before we know where VCPKG_ROOT is (and maybe for commands that don't need VCPKG_ROOT in the first place).

This also changes `--no-disablemetrics` to force enable metrics if the user does that for some reason, even if there's a file named vcpkg.disable-metrics.

Drive bys:
* test_registry_key and get_registry_string where leaktrocities.
* get_registry_string was racy.
* get_registry_string accepted REG_MULTI_SZ despite that not actually being a string type. (It's vector<string>)
2023-02-27 16:52:18 -08:00
Billy O'Neal 755f8469d7
Make e2e tests depend on fewer external resources. (#915)
* Make e2e tests depend on fewer external resources.

Fixes macos failures caused by Azure Pipelines removing pkgconfig by default, and hopefully speeds some bits up a bit by building less.

* Also try updating MacOS image, and removing fmt dependency from those tests.

* Install pkg-config on MacOS because zlib needs it and avoiding the zlib dependency seems impractical.
2023-02-18 01:20:39 -08:00
autoantwort 874159ce4a
post build check: Always allow .pc files in lib/pkgconfig and debug/lib/pkgconfig (#906) 2023-02-15 15:08:41 -08:00
Billy O'Neal e9487f1afa
Fix stealth merge conflict (#904)
* Fix stealth merge conflict

Between https://github.com/microsoft/vcpkg-tool/pull/856 and https://github.com/microsoft/vcpkg-tool/pull/899

* Oops, one more e2e test format SNAFU
2023-02-14 17:40:56 -08:00
autoantwort 2f3a6b407e
ci: Don't pull in ports that causes cascades (#856) 2023-02-14 12:45:40 -08:00
soroshsabz 07984253f6
Unsupported platform added for env (fixes #29559) (#891)
* Unsupported platform added for env (fixes #29559)

* Unsupported platform added for env (fixes #29559)

* Revert error on linux, for testing CI

* Ignore error on linux

* Revert settings change

* Localized message
2023-02-13 11:15:38 -08:00
autoantwort 9a828f57d1
pkgconfig post-build-check: Detect more problems, fix output and add e2e tests (#865)
* pkgconfig post-build-check: Detect more problems, fix output and add e2e tests

* Apply CR
2023-02-10 20:45:59 -08:00
Billy O'Neal ab466a1f2b
Remove use of `dumpbin` from post-build checks. (#834)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2023-02-07 19:10:46 -08:00
Billy O'Neal bb803ff93c
Avoid needing to triple escape paths in z-applocal tests. (#869) 2023-01-27 17:27:49 -08:00
autoantwort fcfbfa4a21
[post build lint] Check for absolute paths (#172) 2023-01-20 12:58:27 -08:00
Kai Pastor 062d9793de
Fix broken e2e test (#845)
* Fix broken e2e test

* Update patterns
2023-01-09 11:39:37 -08:00
val e8c0b20ba6
Replacing applocal.ps1 with C++ 😍 (#814)
* billys changes

* billys stealth merge conflicts solved

* first draft of plugins

* added recursive calls

* Tolerate DLLs without import tables.

* qt works

* rid of regex

* added mutex

* check for latest

* formatting

* quick fix

* fix

* fix

* comments

* added macros

* added more macros

* fix

* Reverts lineinfo changes

* Adds extra endline

* added e2e tests

* e2e tests fix

* formatting

* added architecture check on e2e tests

* please work

* localized message

* formatting

* format

* formatting

* changed e2e tests to not check in binaries

* comments

* e2e test fix

* export

* small optimization

* copying the vcpkg executable when using export cmd

* Test

* comments

* error handling

* fix

* comments

* format fix

* Changed mutant

* Comments

* e2e test

* e2e test

* comments

* format

* comments

* revert changes to export

* format

* qt plugins

* format

* adding vcpkg.exe to export

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2022-12-30 17:00:38 -08:00
Victor Romero 02abc6628c
[RFC][registries] Allow pattern matching in packages declarations (#778)
* 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>
2022-12-12 11:38:22 -08:00
autoantwort 452a34c272
The vcpkg-root e2e test currently detects manifest files above $VCPKG_ROOT and fails if it finds one. The test should be independent of that. (#815) 2022-12-07 13:18:23 -08:00
autoantwort 08179bb991
e2e tests: undouble output (#801)
* e2e tests: undouble output

* Fix windows ci
2022-11-16 16:02:15 -08:00
autoantwort 615734526b
e2e tests: Massively speed up format check (#811)
* e2e tests: Massively speed up format check

It now need 7.5 instead of 187 seconds

* Set git user
2022-11-14 13:06:23 -08:00
autoantwort 837ecfc15b
Fix e2e test on arm64-osx (#791) 2022-11-09 11:09:52 -08:00
Billy O'Neal 0614140d20
Change the mismatched VCPKG_ROOT message to note which vcpkg.exe is emitting the message for clarity. (#775) 2022-10-28 10:37:51 -07:00
val a1e5a75383
Configuring overlay ports and overlay triplets through the manifest (#743)
* overlays through manifest implemented

* turned artifacts on

* artifacts settings once more

* fixed formatting

* brought overlays to vcpkgpaths

* artifacts settings

* format

* sending merged overlay triplets

* moved constructor

* passing parameters by reference

* e2e tests

* bad paths test

* fix

* resolves overlay paths relative to vcpkg-configuration.json

* path fix

* Update test config

* modified make_relative_to_manifest

* Fix build

* changed lambda function

* made manifest directory const

* Revert

* Revert lambda function

* Add get_manifest_directory()

* making make_relative_to_manifest cleaner

* Comments

* Comments

Co-authored-by: Valeria Conde <t-vconde@microsoft.com>
2022-10-19 17:54:16 -07:00
Billy O'Neal 0cba610af7
Ignore the VCPKG_ROOT environment variable when we detect a vcpkg_root. (#725)
* Remove unique_ptr from VcpkgCmdArguments.

* Ignore the VCPKG_ROOT environment variable when we detect a vcpkg_root.

This resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1634907

In https://github.com/actions/runner-images/pull/6196 we have yet another CI system that is trying to helpfully set VCPKG_ROOT for customers to find their vcpkg instance which yet again breaks classic-mode-as-submodule customers. This change mitigates the issue by ignoring the environment variable when we detect a valid VCPKG_ROOT, which the user can override by using the command line option.

* Fix disable-metrics test and echo tool output.

* Fix imprecise env-passthrough test.
2022-10-11 15:28:03 -07:00
autoantwort 3221bf0e82
pass VERSION to cmake when building port (#717)
* pass PORT_VERSION to cmake when building port

* Rename PORT_VERSION to VERSION

* Add e2e tests
2022-10-10 16:13:20 -07:00
Victor Romero a447460421
Detect whether vcpkg is running in a CI environment (#713)
* Detect and track CI environments

* Skip detection loop if metrics are disabled

* Add environment variable to opt-out from CI detection.

* Use known CI providers array directly

* Add accessor for detected CI environment

* Add end-to-end tests

Co-authored-by: Billy O'Neal <bion@microsoft.com>
2022-10-03 14:34:28 -07:00