diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-07-02 20:20:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-02 20:20:07 -0700 |
| commit | a28bfe76740349b519d4737260dad8e160b41f6c (patch) | |
| tree | a216ae08f54aab4d73892107ab64d4778fc0d2c9 /toolsrc/include | |
| parent | f24543e83134c0199df370d683f69641fc66c44a (diff) | |
| download | vcpkg-a28bfe76740349b519d4737260dad8e160b41f6c.tar.gz vcpkg-a28bfe76740349b519d4737260dad8e160b41f6c.zip | |
[vcpkg] Remove the tombstones and 'ignore' baseline concepts. (#12197)
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.
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/files.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/binarycaching.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/build.h | 51 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/install.h | 1 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgpaths.h | 2 |
5 files changed, 38 insertions, 20 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 7676b49a0..68ef2dbcd 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -163,8 +163,10 @@ namespace vcpkg::Files virtual bool is_empty(const fs::path& path) const = 0; virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; bool create_directory(const fs::path& path, ignore_errors_t); + bool create_directory(const fs::path& path, LineInfo li); virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; bool create_directories(const fs::path& path, ignore_errors_t); + bool create_directories(const fs::path& path, LineInfo); virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; virtual bool copy_file(const fs::path& oldpath, const fs::path& newpath, diff --git a/toolsrc/include/vcpkg/binarycaching.h b/toolsrc/include/vcpkg/binarycaching.h index c1db1f169..24c81b905 100644 --- a/toolsrc/include/vcpkg/binarycaching.h +++ b/toolsrc/include/vcpkg/binarycaching.h @@ -35,8 +35,6 @@ namespace vcpkg virtual RestoreResult try_restore(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
/// Called upon a successful build of `action`
virtual void push_success(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
- /// Called upon a failure during the build of `action`
- virtual void push_failure(const VcpkgPaths& paths, const std::string& abi_tag, const PackageSpec& spec) = 0;
/// Requests the result of `try_restore()` without actually downloading the package. Used by CI to determine
/// missing packages.
virtual RestoreResult precheck(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 804cb6673..ea9f86fef 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -35,17 +35,40 @@ namespace vcpkg::System namespace vcpkg::Build { + enum class BuildResult + { + NULLVALUE = 0, + SUCCEEDED, + BUILD_FAILED, + POST_BUILD_CHECKS_FAILED, + FILE_CONFLICTS, + CASCADED_DUE_TO_MISSING_DEPENDENCIES, + EXCLUDED, + DOWNLOADED + }; + + struct IBuildLogsRecorder + { + virtual void record_build_result(const VcpkgPaths& paths, + const PackageSpec& spec, + BuildResult result) const = 0; + }; + + const IBuildLogsRecorder& null_build_logs_recorder() noexcept; + namespace Command { int perform_ex(const FullPackageSpec& full_spec, const SourceControlFileLocation& scfl, const PortFileProvider::PathsPortFileProvider& provider, IBinaryProvider& binaryprovider, + const IBuildLogsRecorder& build_logs_recorder, const VcpkgPaths& paths); void perform_and_exit_ex(const FullPackageSpec& full_spec, const SourceControlFileLocation& scfl, const PortFileProvider::PathsPortFileProvider& provider, IBinaryProvider& binaryprovider, + const IBuildLogsRecorder& build_logs_recorder, const VcpkgPaths& paths); int perform(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); @@ -100,13 +123,6 @@ namespace vcpkg::Build ARIA2, }; const std::string& to_string(DownloadTool tool); - - enum class FailOnTombstone - { - NO = 0, - YES - }; - enum class PurgeDecompressFailure { NO = 0, @@ -122,20 +138,18 @@ namespace vcpkg::Build CleanPackages clean_packages; CleanDownloads clean_downloads; DownloadTool download_tool; - FailOnTombstone fail_on_tombstone; PurgeDecompressFailure purge_decompress_failure; }; - enum class BuildResult - { - NULLVALUE = 0, - SUCCEEDED, - BUILD_FAILED, - POST_BUILD_CHECKS_FAILED, - FILE_CONFLICTS, - CASCADED_DUE_TO_MISSING_DEPENDENCIES, - EXCLUDED, - DOWNLOADED + static constexpr BuildPackageOptions default_build_package_options{ + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::OnlyDownloads::NO, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES, + Build::CleanDownloads::NO, + Build::DownloadTool::BUILT_IN, + Build::PurgeDecompressFailure::YES, }; static constexpr std::array<BuildResult, 6> BUILD_RESULT_VALUES = { @@ -194,6 +208,7 @@ namespace vcpkg::Build ExtendedBuildResult build_package(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& config, IBinaryProvider& binaries_provider, + const IBuildLogsRecorder& build_logs_recorder, const StatusParagraphs& status_db); enum class BuildPolicy diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 9a438b039..2700ac3a8 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -86,6 +86,7 @@ namespace vcpkg::Install const VcpkgPaths& paths, StatusParagraphs& status_db, IBinaryProvider& binaryprovider, + const Build::IBuildLogsRecorder& build_logs_recorder, const CMakeVars::CMakeVarProvider& var_provider); extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 08efc9541..296b6a314 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -75,6 +75,8 @@ namespace vcpkg ~VcpkgPaths(); fs::path package_dir(const PackageSpec& spec) const; + fs::path build_dir(const PackageSpec& spec) const; + fs::path build_dir(const std::string& package_name) const; fs::path build_info_file_path(const PackageSpec& spec) const; fs::path listfile_path(const BinaryParagraph& pgh) const; |
