Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qcoro] New port #33273

Merged
merged 8 commits into from
Oct 9, 2023
Merged

[qcoro] New port #33273

merged 8 commits into from
Oct 9, 2023

Conversation

danvratil
Copy link
Contributor

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@danvratil danvratil marked this pull request as draft August 19, 2023 18:03
@danvratil
Copy link
Contributor Author

I disabled support for OSX for now, because Apple Clang compiler ICEs in Release build, I need to reproduce it in upstream CI and debug the problem further to be able to find out how to workaround the ICE.

@danvratil danvratil marked this pull request as ready for review August 19, 2023 20:38
@danvratil danvratil changed the title [qcoro-qt6] New port [qcoro] New port Aug 20, 2023
@Adela0814 Adela0814 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Aug 21, 2023
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO danvratil/qcoro
REF "v0.9.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
REF "v0.9.0"
REF "v${VERSION}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Comment on lines 1 to 13
commit 1f420bb8f9f0028d1289143c4a51bcf8da88387d
Author: Marius P <nmariusp1@gmail.com>
Date: Sat May 13 12:40:48 2023 +0300

qcorowebsocket replace QWebSocket::error with QWebSocket::errorOccurred

I build using cmake build configuration "Debug" not "RelWithDebInfo".
Building qcoro fails with error "qcoro/qcoro/websockets/qcorowebsocket.cpp:
35:73: error: ‘void QWebSocket::error(QAbstractSocket::SocketError)’
is deprecated: Use errorOccurred instead [-Werror=deprecated-declarations]".
Because "# Only enable strict warnings in debug mode
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Werror -pedantic")".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, removed. I though I'd keep reference to the upstream commit that this patch contains.

index be9c1f7..c686d14 100644
--- a/qcoro/websockets/qcorowebsocket.cpp
+++ b/qcoro/websockets/qcorowebsocket.cpp
@@ -32,7 +32,13 @@ public:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please submit the content of this patch to the upstream, we need to wait for their approval.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github user names checks out to be upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm the upstream :) This patch is already in the main branch, just wasn't included in 0.9.0 release. It will be dropped once 0.10.0 is out.

"homepage": "https://www.github.com/danvratil/qcoro",
"documentation": "https://qcoro.dvratil.cz",
"license": "MIT",
"supports": "!osx",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to ci. baseline instead of in the supports field. Because upstream supports OSX.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, hopefully I did it correctly.

@Adela0814
Copy link
Contributor

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Adela0814 Adela0814 marked this pull request as draft August 21, 2023 07:33
Triggers ICE in release build, but OSX is officially supported,
so just expect CI to fail.
@danvratil danvratil marked this pull request as ready for review August 21, 2023 20:16
@Adela0814 Adela0814 added the requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function label Aug 22, 2023
@Adela0814
Copy link
Contributor

@danvratil I encountered an error while testing usage:

1> [CMake] CMake Error at E:/4/vcpkg/scripts/buildsystems/vcpkg.cmake:855 (_find_package):
1> [CMake]   By not providing "FindQCoro6Coro.cmake" in CMAKE_MODULE_PATH this project
1> [CMake]   has asked CMake to find a package configuration file provided by
1> [CMake]   "QCoro6Coro", but CMake did not find one.
1> [CMake] 
1> [CMake]   Could not find a package configuration file provided by "QCoro6Coro" with
1> [CMake]   any of the following names:
1> [CMake] 
1> [CMake]     QCoro6CoroConfig.cmake
1> [CMake]     qcoro6coro-config.cmake
1> [CMake] 
1> [CMake]   Add the installation prefix of "QCoro6Coro" to CMAKE_PREFIX_PATH or set
1> [CMake]   "QCoro6Coro_DIR" to a directory containing one of the above files.  If
1> [CMake]   "QCoro6Coro" provides a separate development package or SDK, be sure it has
1> [CMake]   been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
1> [CMake]   E:/4/vcpkg/installed/x64-windows/share/QCoro6Core/QCoro6CoreConfig.cmake:30 (find_dependency)
1> [CMake]   E:/4/vcpkg/scripts/buildsystems/vcpkg.cmake:855 (_find_package)
1> [CMake]   CMakeTest/CMakeLists.txt:15 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "E:/CMakeTest/out/build/x64-debug/CMakeFiles/CMakeOutput.log".
1> [CMake] See also "E:/CMakeTest/out/build/x64-debug/CMakeFiles/CMakeError.log".
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="E:\CMakeTest\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe"  -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="E:/4/vcpkg/scripts/buildsystems/vcpkg.cmake" "E:\CMakeTest" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="E:\CMakeTest\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe"  -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="E:/4/vcpkg/scripts/buildsystems/vcpkg.cmake" "E:\CMakeTest" 2>&1"' returned with exit code: 1'.

Usage:

qcoro-qt6 provides CMake targets:

    find_package(QCoro6Core CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::Core)

    find_package(QCoro6DBus CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::DBus)

    find_package(QCoro6Network CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::Network)

    find_package(QCoro6Qml CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::Qml)

    find_package(QCoro6Quick CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::Quick)

    find_package(QCoro6Test CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::Test)

    find_package(QCoro6WebSockets CONFIG REQUIRED)
    target_link_libraries(main PRIVATE QCoro6::WebSockets)

@Adela0814
Copy link
Contributor

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Adela0814 Adela0814 marked this pull request as draft August 24, 2023 10:02
@danvratil danvratil marked this pull request as ready for review October 6, 2023 15:04
@Adela0814 Adela0814 added info:reviewed Pull Request changes follow basic guidelines and removed requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function labels Oct 8, 2023
@Adela0814
Copy link
Contributor

All feature tested pass on the following triplets:

  • x64-windows
  • x64-windows-static
  • x86-windows

Usage tested pass on x64-windows.

@BillyONeal BillyONeal merged commit 848006d into microsoft:master Oct 9, 2023
15 checks passed
@BillyONeal
Copy link
Member

Thanks for the new port and 'confirming with upstream' that the patch was OK :)

BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Oct 11, 2023
Results from build: https://dev.azure.com/vcpkg/public/_build/results?buildId=95281

PASSING, REMOVE FROM FAIL LIST: qcoro:x64-osx (/Users/vagrant/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt).
Caused by microsoft#33273

The comment says that it's an ICE but it passed in CI; this might be a form of intermittent compiler crash. If we get a failure next time we should change this to skip instead.
BillyONeal added a commit that referenced this pull request Oct 12, 2023
Results from build: https://dev.azure.com/vcpkg/public/_build/results?buildId=95281

PASSING, REMOVE FROM FAIL LIST: qcoro:x64-osx (/Users/vagrant/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt).
Caused by #33273

The comment says that it's an ICE but it passed in CI; this might be a form of intermittent compiler crash. If we get a failure next time we should change this to skip instead.
clementperon pushed a commit to clementperon/vcpkg that referenced this pull request Oct 16, 2023
clementperon pushed a commit to clementperon/vcpkg that referenced this pull request Oct 16, 2023
Results from build: https://dev.azure.com/vcpkg/public/_build/results?buildId=95281

PASSING, REMOVE FROM FAIL LIST: qcoro:x64-osx (/Users/vagrant/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt).
Caused by microsoft#33273

The comment says that it's an ICE but it passed in CI; this might be a form of intermittent compiler crash. If we get a failure next time we should change this to skip instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants