[outcome] Update to version 2.2.3 (#25855)

* [outcome] Update to version 2.2.3

* [outcome] Add license information

* [outcome] Refactor deprecated functions

* [status-code] Update to latest version compatible with outcome 2.2.3

* [outcome] Provide polyfill features and extract status-code

* [outcome] Remove msvc linkage patch

* [llfio] Teach port about outcome polyfills

* [llfio] Fix vendored status-code include path

* [outcome][status-code][llfio] update version database

* Don't switch C++ standard version on polyfill feature

* [outcome] Fix version entry

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
Henrik Gaßmann 2022-09-02 19:40:12 +02:00 committed by GitHub
parent c506e9c4ec
commit 31d77f607b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 200 additions and 59 deletions

View File

@ -0,0 +1,16 @@
diff --git a/include/llfio/v2.0/status_code.hpp b/include/llfio/v2.0/status_code.hpp
index 03eb0f67..0c3f5e41 100644
--- a/include/llfio/v2.0/status_code.hpp
+++ b/include/llfio/v2.0/status_code.hpp
@@ -57,7 +57,11 @@ as that (a) enables safe header only LLFIO on Windows (b) produces better codege
#include "outcome/try.hpp"
// Bring in status code utility
#include "outcome/experimental/coroutine_support.hpp"
+#if 0
#include "outcome/experimental/status-code/include/system_code_from_exception.hpp"
+#else
+#include <status-code/system_code_from_exception.hpp>
+#endif
#if !defined(LLFIO_ENABLE_COROUTINES) && defined(OUTCOME_FOUND_COROUTINE_HEADER)
#define LLFIO_ENABLE_COROUTINES 1
#endif

View File

@ -15,6 +15,7 @@ vcpkg_from_github(
# https://github.com/ned14/llfio/issues/83
# To be removed on next update
issue-83-fix-backport.patch
fix-vendored-status-code-include.patch
)
vcpkg_from_github(

View File

@ -1,7 +1,7 @@
{
"name": "llfio",
"version": "2.0-20220112",
"port-version": 2,
"port-version": 3,
"description": "P1031 low level file i/o and filesystem library for the C++ standard",
"homepage": "https://github.com/ned14/llfio",
"license": "Apache-2.0 OR BSL-1.0",
@ -34,6 +34,13 @@
"features": [
"polyfill-cxx17"
]
},
{
"name": "outcome",
"default-features": false,
"features": [
"polyfill-cxx17"
]
}
]
},
@ -46,6 +53,13 @@
"features": [
"polyfill-cxx20"
]
},
{
"name": "outcome",
"default-features": false,
"features": [
"polyfill-cxx20"
]
}
]
},

View File

@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a292728cf4..5286b5e366 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,17 +40,6 @@ include(QuickCppLibRequireOutOfSourceBuild)
include(QuickCppLibUtils)
include(QuickCppLibPolicies)
-if(OUTCOME_BUNDLE_EMBEDDED_STATUS_CODE)
- ensure_git_subrepo("${CMAKE_CURRENT_SOURCE_DIR}/include/outcome/experimental/status-code/include" "https://github.com/ned14/status-code.git")
-else()
- find_quickcpplib_library(status-code
- GIT_REPOSITORY "https://github.com/ned14/status-code.git"
- GIT_TAG "${OUTCOME_DEPENDENCY_STATUS_CODE_GIT_TAG}"
- REQUIRED
- IS_HEADER_ONLY
- )
-endif()
-
# Parse the version we tell cmake directly from the version header file
ParseProjectVersionFromHpp("${CMAKE_CURRENT_SOURCE_DIR}/include/outcome/detail/version.hpp" VERSIONSTRING)
# Sets the usual PROJECT_NAME etc
@@ -99,8 +88,16 @@ else()
IS_HEADER_ONLY
)
endif()
-if (NOT OUTCOME_BUNDLE_EMBEDDED_STATUS_CODE)
- list_filter(${PROJECT_NAME}_HEADERS EXCLUDE REGEX /status-code/include/)
+if(OUTCOME_BUNDLE_EMBEDDED_STATUS_CODE)
+ ensure_git_subrepo("${CMAKE_CURRENT_SOURCE_DIR}/include/outcome/experimental/status-code/include" "https://github.com/ned14/status-code.git")
+else()
+ find_quickcpplib_library(status-code
+ GIT_REPOSITORY "https://github.com/ned14/status-code.git"
+ GIT_TAG "${OUTCOME_DEPENDENCY_STATUS_CODE_GIT_TAG}"
+ REQUIRED
+ IS_HEADER_ONLY
+ )
+ list_filter(${PROJECT_NAME}_HEADERS EXCLUDE REGEX include/outcome/experimental/status-code/)
endif()
# Make an interface only library so dependent CMakeLists can bring in this header-only library

View File

@ -0,0 +1,16 @@
diff --git a/include/outcome/experimental/coroutine_support.hpp b/include/outcome/experimental/coroutine_support.hpp
index 21759ede58..6c4b152294 100644
--- a/include/outcome/experimental/coroutine_support.hpp
+++ b/include/outcome/experimental/coroutine_support.hpp
@@ -45,7 +45,11 @@ Distributed under the Boost Software License, Version 1.0.
OUTCOME_V2_NAMESPACE_END
#ifdef __cpp_exceptions
+#if 0
#include "status-code/include/system_code_from_exception.hpp"
+#else
+#include <status-code/system_code_from_exception.hpp>
+#endif
OUTCOME_V2_NAMESPACE_BEGIN
namespace awaitables
{

View File

@ -1,12 +0,0 @@
diff --git "a/cmake/headers.cmake" "b/cmake/headers.cmake"
index 108038d16..bf4807e16 100644
--- "a/cmake/headers.cmake"
+++ "b/cmake/headers.cmake"
@@ -47,7 +47,6 @@ set(outcome_HEADERS
"include/outcome/experimental/status-code/include/system_code_from_exception.hpp"
"include/outcome/experimental/status-code/include/system_error2.hpp"
"include/outcome/experimental/status-code/include/win32_code.hpp"
- "include/outcome/experimental/status-code/single-header/system_error2.hpp"
"include/outcome/experimental/status_outcome.hpp"
"include/outcome/experimental/status_result.hpp"
"include/outcome/iostream_support.hpp"

View File

@ -15,61 +15,48 @@
# the exact copy of those third party libraries known to
# have passed Outcome's CI process.
message(WARNING [=[
Outcome depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's and Outcome's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against.
]=])
if ("polyfill-cxx20" IN_LIST FEATURES)
message(WARNING [=[
Outcome depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's and Outcome's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against.
]=])
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ned14/outcome
REF 9c6ad6e8e6a48ddde65c0617e3df306bc901b41d
SHA512 b53807fdf9ac3647882f2029a7c5311e7f313abaec703142d2c6d4e73651898d868bfdd600e5f2fa3344e91ebb576324b4624ccf4aa8e09314b7a7ede4cb0fbc
REF 147ec1e8673c34cb7cf431dfdbf211d8072d7656
SHA512 139723be3618b9f3c26c7da6fa5682e6810fc93192bd8752fb7a39378fa1bee8c14b8077d30f71852995bc323dd7beb6676635991995577797b054913cb10231
HEAD_REF develop
PATCHES
outcome-prune-sources.patch
fix-find-library.patch
fix-status-code-include.patch
)
# Outcome needs a copy of QuickCppLib with which to bootstrap its cmake
file(COPY "${CURRENT_INSTALLED_DIR}/include/quickcpplib"
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/include/"
)
file(COPY "${CURRENT_INSTALLED_DIR}/share/ned14-internal-quickcpplib/"
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/"
)
# Outcome expects status-code to live inside its include directory
file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/"
DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/"
)
file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/detail/"
DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/detail/"
)
set(extra_config)
# Because outcome's deployed files are header-only, the debug build is not necessary
set(VCPKG_BUILD_TYPE release)
# Already installed dependencies don't appear on the include path, which Outcome assumes.
string(APPEND VCPKG_CXX_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
string(APPEND VCPKG_C_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
# Use Outcome's own build process, skipping examples and tests.
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
-DPROJECT_IS_DEPENDENCY=On
-Dquickcpplib_FOUND=1
-Dquickcpplib_DIR=${CURRENT_INSTALLED_DIR}/share/quickcpplib
-DOUTCOME_BUNDLE_EMBEDDED_STATUS_CODE=OFF
-Dstatus-code_DIR=${CURRENT_INSTALLED_DIR}/share/status-code
-DOUTCOME_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
${extra_config}
)
if("run-tests" IN_LIST FEATURES)
vcpkg_build_cmake(TARGET test)
vcpkg_cmake_build(TARGET test)
endif()
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/outcome)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/outcome)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

View File

@ -1,14 +1,54 @@
{
"name": "outcome",
"version-string": "2.2.2-20211208",
"version": "2.2.3",
"description": "Provides very lightweight outcome<T> and result<T> (non-Boost edition)",
"homepage": "https://github.com/ned14/outcome",
"license": "Apache-2.0 OR BSL-1.0",
"supports": "!uwp",
"dependencies": [
"ned14-internal-quickcpplib",
"status-code"
"status-code",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"polyfill-cxx17": {
"description": "Polyfill C++17 entities",
"dependencies": [
{
"name": "ned14-internal-quickcpplib",
"default-features": false,
"features": [
"polyfill-cxx17"
]
},
{
"name": "outcome",
"default-features": false,
"features": [
"polyfill-cxx20"
]
}
]
},
"polyfill-cxx20": {
"description": "Polyfill C++20 entities",
"dependencies": [
{
"name": "ned14-internal-quickcpplib",
"default-features": false,
"features": [
"polyfill-cxx20"
]
}
]
},
"run-tests": {
"description": "Build and run the dependency validation tests"
}

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf3e8c1..aa380ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,7 +108,6 @@ foreach(source
)
target_sources(status-code INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${source}>"
- "$<INSTALL_INTERFACE:${source}>"
)
get_filename_component(dir ${source} DIRECTORY)
install(FILES "${source}"

View File

@ -1,24 +1,25 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ned14/status-code
REF 0cca391ad9168581641b569e031f25c7ee1673b3
SHA512 5fdf3e268d0a4a388202547ceac271832642648fdc50824a8f26d86bad1d45c93394ff6651e50232dde534e057dfadaf7a7436b893dd7b182a75bcd57e24fc9d
REF 60ec9e46916e5170051293e7925729ba88951934
SHA512 f7a9448419f8e9228cd29c3b2e9268712de985675acea3b51f742ce88e524e7f51ccea7e08c89bf4e6d38eb1131416af052192531c168eed1f45e7eeda20fed6
HEAD_REF master
PATCHES
no-target-sources.patch # see https://github.com/ned14/status-code/issues/43
)
# Because status-code's deployed files are header-only, the debug build is not necessary
set(VCPKG_BUILD_TYPE release)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
-DPROJECT_IS_DEPENDENCY=On
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status-code)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/status-code)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")

View File

@ -1,7 +1,17 @@
{
"name": "status-code",
"version-string": "1.0.0-20211208",
"port-version": 1,
"version-string": "1.0.0-20220104",
"description": "Proposed SG14 status_code for the C++ standard (https://wg21.link/P1028).",
"homepage": "https://github.com/ned14/status-code"
"homepage": "https://github.com/ned14/status-code",
"license": "Apache-2.0 OR BSL-1.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -4390,7 +4390,7 @@
},
"llfio": {
"baseline": "2.0-20220112",
"port-version": 2
"port-version": 3
},
"llgl": {
"baseline": "2019-08-15",
@ -5433,7 +5433,7 @@
"port-version": 1
},
"outcome": {
"baseline": "2.2.2-20211208",
"baseline": "2.2.3",
"port-version": 0
},
"p-ranav-csv": {
@ -6977,8 +6977,8 @@
"port-version": 1
},
"status-code": {
"baseline": "1.0.0-20211208",
"port-version": 1
"baseline": "1.0.0-20220104",
"port-version": 0
},
"status-value-lite": {
"baseline": "1.1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b6959e579906ce5c4ea9aa59f467499dce49a3b6",
"version": "2.0-20220112",
"port-version": 3
},
{
"git-tree": "c3d2d8d9dfddbbf74af7e1f603ac18e4aee2fe7a",
"version": "2.0-20220112",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "527591e7e0e55bc20c74cdc5553c08635b350999",
"version": "2.2.3",
"port-version": 0
},
{
"git-tree": "2abc0cf7913b6db02a17f3b01f6e5744bd43a9ae",
"version-string": "2.2.2-20211208",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "acf45fde7be9ba87dd72d79d3d8f79bc639e8530",
"version-string": "1.0.0-20220104",
"port-version": 0
},
{
"git-tree": "c71af3efa61ec9c5bbb91287b610bcc561e95a47",
"version-string": "1.0.0-20211208",