zhjwpku commented on code in PR #896:
URL: https://github.com/apache/iceberg-cpp/pull/896#discussion_r3939300373


##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -422,7 +422,7 @@ function(resolve_croaring_dependency)
     set(CROARING_URL "$ENV{ICEBERG_CROARING_URL}")
   else()
     set(CROARING_URL
-        
"https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.4.3.tar.gz";)
+        
"https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.11.tar.gz";)

Review Comment:
   I'm not sure downgrade the third-party version is the right way to go :-(



##########
dev/test_build_definition_parity.py:
##########
@@ -0,0 +1,94 @@
+# 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.
+
+import re
+import unittest
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def read(relative_path: str) -> str:
+    return (ROOT / relative_path).read_text(encoding="utf-8")
+
+
+def extract(pattern: str, relative_path: str) -> str:
+    match = re.search(pattern, read(relative_path))
+    if match is None:
+        raise AssertionError(f"Could not find {pattern!r} in {relative_path}")
+    return match.group(1)
+
+
+class BuildDefinitionParityTest(unittest.TestCase):

Review Comment:
   Can this check cover all the relevant files? ISTM we could simply add a 
section to `AGENTS.md` instructing AI coding tools to keep the CMake and Meson 
build files in sync. Wouldn’t that be enough?



##########
dev/test_build_definition_parity.py:
##########
@@ -0,0 +1,94 @@
+# 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.
+
+import re
+import unittest
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def read(relative_path: str) -> str:
+    return (ROOT / relative_path).read_text(encoding="utf-8")
+
+
+def extract(pattern: str, relative_path: str) -> str:
+    match = re.search(pattern, read(relative_path))
+    if match is None:
+        raise AssertionError(f"Could not find {pattern!r} in {relative_path}")
+    return match.group(1)
+
+
+class BuildDefinitionParityTest(unittest.TestCase):
+    def test_public_headers_are_installed_by_both_build_systems(self) -> None:
+        self.assertIn("puffin_dv_io.h", read("src/iceberg/meson.build"))
+        self.assertIn(
+            "token_refresh_scheduler.h",
+            read("src/iceberg/catalog/rest/auth/meson.build"),
+        )
+        self.assertIn(
+            "iceberg_install_all_headers(iceberg/catalog)",
+            read("src/iceberg/catalog/CMakeLists.txt"),
+        )
+
+    def test_core_tests_are_run_by_both_build_systems(self) -> None:

Review Comment:
   This doesn't look right to me. We shouldn't run a test for a previously 
missing file.
   



##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -532,7 +540,7 @@ function(resolve_nlohmann_json_dependency)
     set(NLOHMANN_JSON_URL "$ENV{ICEBERG_NLOHMANN_JSON_URL}")
   else()
     set(NLOHMANN_JSON_URL
-        
"https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz";)
+        
"https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz";)

Review Comment:
   I'd suggest upgrade these versions in a separate PR.



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