You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/12/23 20:36:29 UTC

[GitHub] [nifi-minifi-cpp] szaszm opened a new pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

szaszm opened a new pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967


   - update date.h to the latest version
   - convert date.h to use FetchContent instead of committing the source to the repo
   - convert date.h to use cmake targets instead of polluting the global include directories
   - add option to disable packaging the non-free Universal C Runtime DLLs on windows and disable by default
   - fetch and package the IANA timezone database on windows to make date.h timezone functions work
   - move `NOMINMAX` definition to the more modern `add_compile_definitions`, and make it actually propagate to third party builds
   - fix compilation issues on VS 2019:
     - multiple instances of relying on the old MSVC extension of being able to take the address of temporaries
     - one instance of declaring an array of string literals as a constant array of mutable strings (literals are `const char*`, not `char*`)
     - had to work around `Identifier::parse` linking issues because of missing DLL interface specification. The workaround if to circumvent the linker by making it inline.
   
   Merry christmas!
   
   -------
   Squashed commit of the following:
   
   commit c1a2c57d4ede41027d24625d9af445e6721fd778
   Author: Marton Szasz <sz...@gmail.com>
   Date:   Wed Dec 23 21:13:09 2020 +0100
   
       update win build script
   
   commit 40cf9ab3f63989e7b4a4e777057e48d21cda2cae
   Author: Marton Szasz <sz...@gmail.com>
   Date:   Wed Dec 23 18:00:51 2020 +0100
   
       fix ucrt
   
   commit 8b4012ae7043f57a4cf2ff786d447167d2c045a0
   Author: Marton Szasz <sz...@gmail.com>
   Date:   Mon Dec 21 14:39:10 2020 +0100
   
       WIP
   
   commit 9e6f762da96e54ac622c6bd29ae59fa3f2a58a6f
   Author: Marton Szasz <sz...@gmail.com>
   Date:   Thu Nov 12 18:25:04 2020 +0100
   
       update date, convert to FetchContent
   
   Signed-off-by: Marton Szasz <sz...@gmail.com>
   -------
   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [x] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [x] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
arpadboda closed pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
szaszm commented on pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967#issuecomment-753839177


   figuring out test linker errors...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967#discussion_r555117732



##########
File path: extensions/windows-event-log/CollectorInitiatedSubscription.cpp
##########
@@ -647,7 +647,10 @@ int CollectorInitiatedSubscription::processQueue(const std::shared_ptr<core::Pro
   while (renderedXMLs_.try_dequeue(xml)) {
     auto flowFile = session->create();
 
-    session->write(flowFile, &WriteCallback(xml));
+    {
+      WriteCallback wc{ xml };

Review comment:
       Okay, makes sense, thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967#discussion_r555105617



##########
File path: extensions/windows-event-log/CollectorInitiatedSubscription.cpp
##########
@@ -647,7 +647,10 @@ int CollectorInitiatedSubscription::processQueue(const std::shared_ptr<core::Pro
   while (renderedXMLs_.try_dequeue(xml)) {
     auto flowFile = session->create();
 
-    session->write(flowFile, &WriteCallback(xml));
+    {
+      WriteCallback wc{ xml };

Review comment:
       The usage is on the next line




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967#discussion_r555105117



##########
File path: extensions/windows-event-log/CollectorInitiatedSubscription.cpp
##########
@@ -647,7 +647,10 @@ int CollectorInitiatedSubscription::processQueue(const std::shared_ptr<core::Pro
   while (renderedXMLs_.try_dequeue(xml)) {
     auto flowFile = session->create();
 
-    session->write(flowFile, &WriteCallback(xml));
+    {
+      WriteCallback wc{ xml };

Review comment:
       The old version took the address of an rvalue, which is an MSVC extension, and I had compilation issues with it. It might have been because of my attempt to compile with `/std:c++latest`, but I figured fixing noncompliant code is a good thing anyway.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #967: MINIFICPP-1398 MINIFICPP-1375 update date, fix EL date functions on windows, fix ucrt issues, fix vs2019 build issues

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #967:
URL: https://github.com/apache/nifi-minifi-cpp/pull/967#discussion_r555102032



##########
File path: extensions/windows-event-log/CollectorInitiatedSubscription.cpp
##########
@@ -647,7 +647,10 @@ int CollectorInitiatedSubscription::processQueue(const std::shared_ptr<core::Pro
   while (renderedXMLs_.try_dequeue(xml)) {
     auto flowFile = session->create();
 
-    session->write(flowFile, &WriteCallback(xml));
+    {
+      WriteCallback wc{ xml };

Review comment:
       What's the reason behind this change?
   Btw this is unused atm.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org