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 2021/09/15 08:43:36 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1138: MINIFICPP-1471 - Build extensions as dynamic libraries and dynamically load them

lordgamez commented on a change in pull request #1138:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1138#discussion_r708935767



##########
File path: extensions/azure/CMakeLists.txt
##########
@@ -34,6 +34,10 @@ target_link_libraries(minifi-azure ${LIBMINIFI} Threads::Threads)
 target_link_libraries(minifi-azure CURL::libcurl LibXml2::LibXml2)
 target_link_libraries(minifi-azure AZURE::azure-storage-blobs AZURE::azure-storage-common AZURE::azure-core)
 
+if (WIN32)
+  target_link_libraries(minifi-azure crypt32.lib bcrypt.lib)

Review comment:
       The same question here, why do we need these additional libs now?

##########
File path: extensions/jni/JNILoader.cpp
##########
@@ -15,16 +15,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "JNILoader.h"
 
-#include "core/FlowConfiguration.h"
+#include "core/extension/Extension.h"
+#include "JVMCreator.h"
 
-bool JNIFactory::added = core::FlowConfiguration::add_static_func("createJNIFactory");
+namespace minifi = org::apache::nifi::minifi;
 
-extern "C" {
+static minifi::jni::JVMCreator& getJVMCreator() {
+  static minifi::jni::JVMCreator instance("JVMCreator");
+  return instance;
+}
 
-void *createJNIFactory(void) {
-  return new JNIFactory();
+static bool init(const std::shared_ptr<org::apache::nifi::minifi::Configure>& config) {
+  getJVMCreator().configure(config);
+  return true;
 }
 
+static void deinit() {
+  // TODO(adebreceni)

Review comment:
       Please specify if there is anything to be done here

##########
File path: cmake/BundledAwsSdkCpp.cmake
##########
@@ -110,6 +119,9 @@ function(use_bundled_libaws SOURCE_DIR BINARY_DIR)
     add_dependencies(AWS::aws-c-io aws-sdk-cpp-external)
     target_include_directories(AWS::aws-c-io INTERFACE ${LIBAWS_INCLUDE_DIR})
     target_link_libraries(AWS::aws-c-io INTERFACE AWS::aws-c-common)
+    if (WIN32)
+        target_link_libraries(AWS::aws-c-io INTERFACE ncrypt.lib)

Review comment:
       Just wondering, what changed that windows now requires ncrypt.lib to be linked?

##########
File path: libminifi/test/unit/FilePatternTests.cpp
##########
@@ -0,0 +1,253 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define CUSTOM_EXTENSION_INIT
+
+#include <filesystem>
+
+#include "../TestBase.h"
+#include "utils/file/FilePattern.h"
+#include "range/v3/view/transform.hpp"
+#include "range/v3/view/map.hpp"
+#include "range/v3/view/join.hpp"
+#include "range/v3/view/cache1.hpp"
+#include "range/v3/view/c_str.hpp"
+#include "range/v3/range/conversion.hpp"
+#include "range/v3/range.hpp"

Review comment:
       Are all these includes necessary? 

##########
File path: thirdparty/aws-sdk-cpp/dll-export-injection.patch
##########
@@ -0,0 +1,52 @@
+diff -rupN aws-sdk-cpp-src/aws-cpp-sdk-core/CMakeLists.txt aws-sdk-cpp-src-patched/aws-cpp-sdk-core/CMakeLists.txt

Review comment:
       I think this patch could use a comment for future reference.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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