openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
134 stars 51 forks source link

Improper use of `set_const` #1526

Open barche opened 10 months ago

barche commented 10 months ago

https://github.com/eschnett/openPMD-api/blob/13ea8b4ecca968a5355825d639b3e9182d14b484/src/binding/julia/Datatype.cpp#L15

In the above line, jlcxx::Module::set_const is used on an std::vector. This was always something that was incompatible with Julia precompilation, and since libcxxwrap-julia 0.11 gives a compile error. A function returning the vector should be used instead.

barche commented 10 months ago

Apologies, I accidently created this issue here instead of on the fork, I didn't realize vscode would do it like that.

eschnett commented 10 months ago

@barche Thanks for the pointer!

franzpoeschel commented 10 months ago

Quote from the other issue:

You're probably noticing a slight breaking change that we did on openPMD_datatypes. We had linker trouble with the constant and since it's a barely-used API, we replaced it with a function. So, yeah, the Julia bindings will need to adapt to this. (This situation is one of the reasons why I'm in favor of trying to go for a single repo in the end)

Feel free to leave this issue open since this change needs to be applied in both places.

eschnett commented 10 months ago

Corrected.