openPMD-api icon indicating copy to clipboard operation
openPMD-api copied to clipboard

Improper use of `set_const`

Open barche opened this issue 1 year ago • 4 comments

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 avatar Sep 05 '23 20:09 barche

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

barche avatar Sep 05 '23 20:09 barche

@barche Thanks for the pointer!

eschnett avatar Sep 05 '23 20:09 eschnett

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.

franzpoeschel avatar Sep 05 '23 20:09 franzpoeschel

Corrected.

eschnett avatar Sep 05 '23 22:09 eschnett