raulcd commented on code in PR #20:
URL: https://github.com/apache/iceberg-cpp/pull/20#discussion_r1899439993


##########
api/iceberg/table.h:
##########
@@ -20,15 +20,24 @@
 #pragma once
 
 #include <memory>
-#include <string_view>
+

Review Comment:
   I've been able to reproduce the memory error locally:
   ```
   $ clang-tidy-18 -p ../iceberg-cpp -checks=file  --format-style file 
../iceberg-cpp/api/iceberg/table.h --extra-arg=-std=c++17 
--enable-module-headers-parsing 
   Error while trying to load a compilation database:
   Could not auto-detect compilation database from directory "../iceberg-cpp"
   No compilation database found in /home/raulcd/code/arrow/../iceberg-cpp or 
any parent directory
   fixed-compilation-database: Error while opening fixed database: No such file 
or directory
   json-compilation-database: Error while opening JSON database: No such file 
or directory
   Running without flags.
   /home/raulcd/code/arrow/.clang-tidy:30:1: error: unknown key 
'AnalyzeTemporaryDtors'
   AnalyzeTemporaryDtors: true
   ^~~~~~~~~~~~~~~~~~~~~
   Error parsing /home/raulcd/code/arrow/.clang-tidy: Invalid argument
   /home/raulcd/code/arrow/.clang-tidy:30:1: error: unknown key 
'AnalyzeTemporaryDtors'
   AnalyzeTemporaryDtors: true
   ^~~~~~~~~~~~~~~~~~~~~
   Error parsing /home/raulcd/code/arrow/.clang-tidy: Invalid argument
   /home/raulcd/code/arrow/.clang-tidy:30:1: error: unknown key 
'AnalyzeTemporaryDtors'
   AnalyzeTemporaryDtors: true
   ^~~~~~~~~~~~~~~~~~~~~
   Error parsing /home/raulcd/code/arrow/.clang-tidy: Invalid argument
   /home/raulcd/code/arrow/.clang-tidy:30:1: error: unknown key 
'AnalyzeTemporaryDtors'
   AnalyzeTemporaryDtors: true
   ^~~~~~~~~~~~~~~~~~~~~
   Error parsing /home/raulcd/code/arrow/.clang-tidy: Invalid argument
   2 errors generated.
   Error while processing 
/home/raulcd/code/arrow/../iceberg-cpp/api/iceberg/table.h.
   error: invalid argument '-std=c++17' not allowed with 'C' 
[clang-diagnostic-error]
   /home/raulcd/code/arrow/../iceberg-cpp/api/iceberg/table.h:22:10: error: 
'memory' file not found [clang-diagnostic-error]
      22 | #include <memory>
         |          ^~~~~~~~
   Found compiler error(s).
   ```
   We might need to generate a [compilation database 
first](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html)
 and use the database attribute: 
https://cpp-linter.github.io/cpp-linter-action/inputs-outputs/#database. It 
seems like it is detecting as if it's a C project by default without it.
   If I build and use the build folder with `-p` it is successful:
   ```
   $ clang-tidy-18 -p /home/raulcd/code/iceberg-cpp/build -checks=file  
--format-style file ../api/iceberg/table.h --extra-arg=-std=c++17 
--enable-module-headers-parsing
   ```
   



-- 
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-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to