From 5ac50c17a002cc8ff5fb7a6713b5618217e7c13b Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:20:41 -0700 Subject: [PATCH 1/3] Test HttpServer build fix (#12001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Test HttpServer build fix * Change files * Cast m_ioThreadCount * fix CoreApp? --------- Co-authored-by: Julio César Rocha Co-authored-by: Julio C. Rocha Co-authored-by: Jon Thysell (JAUNTY) --- ...ative-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json | 7 +++++++ vnext/Microsoft.ReactNative/CoreApp.cpp | 2 +- vnext/Test/HttpServer.cpp | 6 +++--- vnext/Test/HttpServer.h | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json diff --git a/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json b/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json new file mode 100644 index 00000000000..a0a437e907e --- /dev/null +++ b/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Test HttpServer build fix", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/vnext/Microsoft.ReactNative/CoreApp.cpp b/vnext/Microsoft.ReactNative/CoreApp.cpp index 4f0329c4e02..1f4eb5b5e10 100644 --- a/vnext/Microsoft.ReactNative/CoreApp.cpp +++ b/vnext/Microsoft.ReactNative/CoreApp.cpp @@ -231,7 +231,7 @@ static void SetProperties(JsonObject const &json, RNCoreApp *app) { std::wstring nsName; std::wstring localName; if (lastDot != name.rend()) { - nsName = std::wstring{name.begin(), static_cast(name.rend() - lastDot - 1)}; + nsName = std::wstring{name.begin(), static_cast(name.rend() - lastDot - 1)}; localName = std::wstring{lastDot.base()}; } else { localName = name; diff --git a/vnext/Test/HttpServer.cpp b/vnext/Test/HttpServer.cpp index d6ca802d3cb..b08ccacf14b 100644 --- a/vnext/Test/HttpServer.cpp +++ b/vnext/Test/HttpServer.cpp @@ -283,8 +283,8 @@ void HttpSession::Close() #pragma region HttpServer -HttpServer::HttpServer(string &&address, uint16_t port, size_t concurrency) - : m_ioThreadCount{concurrency} +HttpServer::HttpServer(string &&address, uint16_t port, int concurrency) + : m_ioThreadCount{ static_cast(concurrency) } , m_ioContext{concurrency} , m_acceptor{make_strand(m_ioContext)} { @@ -319,7 +319,7 @@ HttpServer::HttpServer(string &&address, uint16_t port, size_t concurrency) } } -HttpServer::HttpServer(uint16_t port, size_t concurrency) +HttpServer::HttpServer(uint16_t port, int concurrency) : HttpServer("0.0.0.0", port, concurrency) { } diff --git a/vnext/Test/HttpServer.h b/vnext/Test/HttpServer.h index a3e25b2f9ad..6ba24c18082 100644 --- a/vnext/Test/HttpServer.h +++ b/vnext/Test/HttpServer.h @@ -126,8 +126,8 @@ class HttpServer : public std::enable_shared_from_this // address - Valid IP address string (i.e. "127.0.0.1). // port - TCP port number (i.e. 80). /// - HttpServer(std::string &&address, uint16_t port, size_t concurrency = 1); - HttpServer(uint16_t port, size_t concurrency = 1); + HttpServer(std::string &&address, uint16_t port, int concurrency = 1); + HttpServer(uint16_t port, int concurrency = 1); ~HttpServer(); From 23403f3d221e1f2a0871497aea6962af1879501d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 23 Aug 2023 17:53:39 -0700 Subject: [PATCH 2/3] Remove change files --- ...ative-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json diff --git a/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json b/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json deleted file mode 100644 index a0a437e907e..00000000000 --- a/change/react-native-windows-ec2cdeb2-afb4-4f37-9956-6004de7e1a72.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Test HttpServer build fix", - "packageName": "react-native-windows", - "email": "30809111+acoates-ms@users.noreply.github.com", - "dependentChangeType": "none" -} From 0d333881d4824c4ddd2ead899c86eabd5721a9e7 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 23 Aug 2023 17:57:39 -0700 Subject: [PATCH 3/3] Change files --- ...ative-windows-ecffcdea-9308-4776-838d-e7e504c267da.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json diff --git a/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json b/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json new file mode 100644 index 00000000000..280b4dba89e --- /dev/null +++ b/change/react-native-windows-ecffcdea-9308-4776-838d-e7e504c267da.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Test HttpServer build fix (#12001)", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +}