* improve messaging for x-script
* add newlines @ EOF
* format
* respond to Billy feedback
* test order of messaging
---------
Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.local>
A customer wanted to run vcpkg in a place where they could not control that a `vcpkg.json` was in a directory above, and requested a way to force classic mode. One used to be able to do this with the `--no-manifest` feature flag, but that was removed some years ago.
This adds a new switch, `--classic`, which effectively skips looking for a manifest.
* Commonize `r`n / `n handling in test cases.
Extracted from https://github.com/microsoft/vcpkg-tool/pull/1514
Rather than each test case inventing their own way of dealing with the Windows/Linux `r`n vs `n difference, this change just always makes the output collection functions to do that transformation.
* Fix damaged -contains pointed out by @ras0219-msft
* first take, use 7zr to unpack 7za instead of cmake, remove cmake dance
* fix merge issues
* fix unit tests
* update vcpkg-scripts-sha.txt
* update vcpkg-scripts-sha.txt
* fix self extracting
* use 7zr for zip formats as well
* undo zip
* use cmake for tar since 7zr needs to unpack twice for .tar.gz
* undo changes to tar
* use cmake for tar decompression
* update vcpkg-scripts-sha
* Make the upgrade test always use the current vcpkgTools.xml.
* use 7zr for zip
* 7zr doesn't work on zip formats
---------
Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.local>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
@autoantwort points out that it makes sense for those to be clickable.
He also wants us to drop the note: prefix from newlines if we aren't attached to a tty; I'm not sure if that is correct.
* Test ci command on malformed port manifests
* Test ci command on individual malformed port manifest
* Pass overlay port errors to OverlayProviderImpl
* Move broken-manifest overlay ports into separate dir
"e2e-ports/overlays" is in common vcpkg test args. It must not contain
ports with broken manifests where the the tool is expected to report the
error.
The tests which need these broken ports already passed an explicit
"--overlay-ports" argument which duplicated the one in @commonArgs.
That is why this commit only changes the value of the explicit argument.
* Ensure that inactive feature can have broken dependencies
Also audited for:
* Consistently following the 'IDE error format' pointing to portfile.cmake.
* Consistently referring to the correct skip policy in the error message where applicable.
* Printing paths and other information relative to ${CURRENT_PACKAGES_DIR} or similar as appropriate.
* Debug before release.
* Don't duplicate messages when a problem happens for both debug and release.
Drive by bugfix:
if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT))
{
error_count += check_crt_linkage_of_libs(
build_info, false, debug_libs, debug_lib_info.value_or_exit(VCPKG_LINE_INFO), msg_sink);
}
was wrong; ONLY_RELEASE_CRT should mean 'these should all be release', not 'we aren't even going to look at debug'.
It is fixed to:
error_count += check_crt_linkage_of_libs(build_info.crt_linkage,
build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT),
debug_libs,
debug_lib_info.value_or_exit(VCPKG_LINE_INFO),
msg_sink);
here.
Drive-by bugfix:
EMPTY_INCLUDE_FOLDER should not block CMAKE_HELPER_PORT from checking that the include folder is, in fact, empty.
Drive-by bugfix:
if (!violations.empty())
{
msg_sink.println_warning(msgPortBugRestrictedHeaderPaths);
print_paths(msg_sink, violations);
msg_sink.println(msgPortBugRestrictedHeaderPaths); // <-- duplicate!
return LintStatus::PROBLEM_DETECTED;
}
Drive-by bugfix:
There were duplicate checks for the lib/cmake and debug/lib/cmake directories which even printed the same message; these have been merged.
Drive-by bugfix:
The existing copyright check emitted nonsense output that included full absolute paths like:
warning: The software license must be available at ${CURRENT_PACKAGES_DIR}/share/cmdline/copyright. vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/D:/b/cmdline//LICENSE")
since at least https://github.com/microsoft/vcpkg-tool/pull/1116/
That check has been basically rewritten to use vcpkg_install_copyright if there's only one src directory, and otherwise give up and print them all
Drive-by bugfix:
Several of the outdated CRTs didn't have the debug versions listed. Also, P was duplicated and there was no R for VC6.
* Fix wrong Header-only usage message
* Cherry pick tests from https://github.com/microsoft/vcpkg-tool/pull/1405
---------
Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
* Eliminate PurgeDecompressFailure.
PurgeDecompressFailure causes the files backend for binary caching to delete the zip file if it fails to decompress. The install command set this to false due to a race consideration: it's possible that a partially uploaded zip is observed when the files backend is pointed to a network share, and deleting the file because we failed to decompress it just stomps on another builder sharing that same binary cache.
It seems incorrect that this reasoning would not apply to any other commands, but most of the other commands said PurgeDecompressFailure::Yes.
This change removes the option entirely in favor of the 'No' behavior.
* Do not redundantly set Editable or Use Head to false in manifest mode.
These are already implied by the blockers on line 1075 and 1080.
* While reviewing changes to https://github.com/microsoft/vcpkg-tool/pull/1339 , I observed that it was strange that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting.
However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition.
This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
Problems were:
- the only test in e2e_ports folder, everything else in e2e-ports
- tests modify files under $VCPKG_ROOT
- Divided in two files where one enough
- Tests fail if package is already in binary cache
* fix warnings
* WIP VCPKG_HASH_ADDITIONAL_FILES
* cleanup
* e2e test
* more cleanup
* appyl format
* enable e2e test on linux and osx
* Fail CI if unsuccesful
* use TARGET_TRIPLET var
* remove ps assignment
* fix e2e
* remove trailing ,
* make test run on other platforms
* Apply suggestions from code review
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* Fix e2e test after CR
* fix syntax errors
* add failure if the file path is relative or not a regular file.
* format and logic fix
* fix format
* fix logic.
* Apply suggestions from code review
- fix typo
- rephrase description sentence
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
* Rephrase description
* Make the failure case actually capture output
* Apply format change
* Test-Match is only available for artifact tests
---------
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
While reviewing changes to https://github.com/microsoft/vcpkg-tool/pull/1339 , I observed that it was strange that the abi hash depends on whether download_only is selected. After discussion with @ras0219-msft , he agreed that the ABI hash shouldn't be affected by this setting.
However, given that in download mode, we intentionally build things which do not have all their dependencies present, it would not be safe to attempt to cache or otherwise install anything in that condition.
This change removes download_only from the ABI calculation, and changes installation to only attempt to install built bits whose dependencies are all satisfied.
* The "entry" function can return an empty registry entry instead of an error. We need to explicitly check if the returned registry entry is non-empty.
* print compiler path
* update messages.json
* fix empty message
* fix format
* add tests and fix
* update vcpkg to latest commit
* fix
* fix
* Fix e2e test on Windows.
* Change scripts SHA to not include https://github.com/microsoft/vcpkg/pull/36056
---------
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>