WillAyd commented on code in PR #912:
URL: https://github.com/apache/iceberg-cpp/pull/912#discussion_r3974671013


##########
meson.options:
##########
@@ -30,13 +30,68 @@
 # and ICEBERG_INSTALL_DOCDIR correspond to Meson's --libdir / --bindir /
 # --includedir / --datadir arguments, respectively
 
+option(
+    'bundle',

Review Comment:
   Meson provides functionality that CMake doesn't have for wrangling 
dependencies and choosing how they should (or shouldn't) be packaged in a 
source distribution / install. As such, I don't think this option makes a lot 
of sense to implement in Meson



##########
meson.options:
##########
@@ -30,13 +30,68 @@
 # and ICEBERG_INSTALL_DOCDIR correspond to Meson's --libdir / --bindir /
 # --includedir / --datadir arguments, respectively
 
+option(
+    'bundle',
+    type: 'feature',
+    description: 'Build Arrow, Avro, and Parquet integrations',
+    value: 'enabled',
+)
+
 option(
     'rest',
     type: 'feature',
     description: 'Build rest catalog client',
     value: 'enabled',
 )
 
+option(
+    'hive',
+    type: 'feature',
+    value: 'disabled',

Review Comment:
   ```suggestion
   ```
   
   I don't think its worth repeating these everywhere; best to keep as auto



##########
subprojects/packagefiles/arrow/CMakeLists.txt:
##########
@@ -0,0 +1,107 @@
+# 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.
+
+cmake_minimum_required(VERSION 3.25)
+project(IcebergArrow LANGUAGES C CXX)
+
+# Meson's CMake module imports library targets but not header installation.

Review Comment:
   Why does we need a CMakeLists.txt file for arrow in the meson subprojects 
space? There is already a Meson wrapdb entry for arrow



##########
.github/workflows/test.yml:
##########
@@ -221,9 +221,22 @@ jobs:
             meson-setup-args: -Drest_integration_test=enabled
           - title: AMD64 Windows 2025
             runs-on: windows-2025
-            meson-setup-args: --vsenv
+            meson-setup-args: --vsenv --buildtype=release 
--cmake-prefix-path=C:/vcpkg/installed/x64-windows-static-md
           - title: AArch64 macOS 26
             runs-on: macos-26
+          - title: AMD64 Ubuntu 26.04, all catalogs, S3 and library variants
+            runs-on: ubuntu-26.04
+            CC: gcc-14
+            CXX: g++-14
+            sql-clients: true
+            benchmarks: true
+            meson-setup-args: --default-library=both --buildtype=release 
-Db_ndebug=true --force-fallback-for=arrow,avro -Dhive=enabled 
-Dsql_catalog=enabled -Dsql_sqlite=enabled -Dsql_postgresql=enabled 
-Dsql_mysql=enabled -Dbenchmarks=enabled -Ds3=enabled -Dsigv4=enabled

Review Comment:
   This would be better expressed via `-Dauto_features=enabled` instead of 
specifying each option; that way the CI scales across all features as they get 
added



##########
meson.build:
##########
@@ -17,11 +17,13 @@
 
 project(
     'iceberg',
+    'c',
     'cpp',
     version: '0.4.0',
     license: 'Apache-2.0',
-    meson_version: '>=1.3.0',
+    meson_version: '>=1.8.3',

Review Comment:
   Do you know why this needs to be bumped? Generally better to keep support 
for older versions unless there's a critical feature



##########
src/iceberg/test/meson.build:
##########
@@ -23,10 +23,54 @@ configure_file(
     input: 'test_config.h.in',
     output: 'test_config.h',
     configuration: conf_data,
-    install: true,
-    install_dir: get_option('includedir') / 'iceberg/test',
 )
 
+# CMake's tests prefer static libraries because they also exercise internal
+# helpers. Keep those symbols private in installed shared libraries. Reuse
+# compiled objects on Unix; Windows needs sources compiled with *_STATIC so
+# references between the test libraries do not use DLL imports.
+foreach name, spec : iceberg_libraries
+    deps = spec.get('dependencies', [])
+    parent = spec.get('parent', '')
+    if parent != ''
+        deps = [get_variable(parent + '_test_dep')] + deps
+    endif
+    test_args = spec.get('compile_args', [])
+    if host_machine.system() == 'windows'
+        test_args += '-D' + name.to_upper() + '_STATIC'
+    endif
+    if get_option('default_library') != 'shared'
+        lib = get_variable(name + '_static_lib')
+    elif host_machine.system() == 'windows'
+        lib = static_library(

Review Comment:
   You can avoid this branching if you use the generic `build_target` function 
and specify the `target_type`



##########
meson.build:
##########
@@ -17,11 +17,13 @@
 
 project(
     'iceberg',
+    'c',
     'cpp',
     version: '0.4.0',
     license: 'Apache-2.0',
-    meson_version: '>=1.3.0',
+    meson_version: '>=1.8.3',
     default_options: [
+        'default_library=static',

Review Comment:
   Do you know why this needs to change?



##########
src/iceberg/CMakeLists.txt:
##########
@@ -184,6 +184,7 @@ list(APPEND
      roaring::roaring)
 list(APPEND
      ICEBERG_STATIC_INSTALL_INTERFACE_LIBS
+     ZLIB::ZLIB

Review Comment:
   Is this related to meson?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to