[cpp] Un-dynamic zip implementation#12453
Conversation
|
Those cpp tests should pass if restarted, just needed a change I forgot about on the hxcpp side. |
|
Is it the handle being dynamic that this is aiming to solve? it seems that this replaces the indirection of dynamic with indirection of a whole other class, at least for haxe.zip.Compress. Couldn't the handle be a |
|
It's the removal of the dynamic handle and the removal of untyped / __global__ (which admittedly isn't used in zip, but is in other parts of the std). It couldn't be |
|
Thanks for explaining a bit more! That makes sense, given that the class was already there (already extending hx::Object) this does seem to improve things without too much added complexity. |
|
I think third time might be the charm for those cpp tests. Think I messed up the library flag in the build xml which is why it's giving weird hxcpp cache errors. |
|
Something very odd is going on with the hxcpp cache. I've got a cache on my machine and it was working fine, seems like the problem(?) is that the ci was setting the cache to a relative path. This meant instead of a single cache folder there was a I have not yet figured out why the linux builds can't find the zlib functions, "works fine on my machine". |
We were setting it to
I've think I've had similar issues like this before due to linking order. Might need to add the glue files before adding the zlib sources, to stop the linker assuming that the zlib symbols are unused. hxcpp cache is a factor here, since it causes it to be linked as a static library. |
|
does indeed seem to be an order issue, switched the order around an the two linux tasks now pass. |
| PLATFORM: linux64 | ||
| TEST: ${{matrix.target}} | ||
| HXCPP_COMPILE_CACHE: ~/hxcache | ||
| HXCPP_COMPILE_CACHE: ${{ github.workspace }}/hxcache |
There was a problem hiding this comment.
Oh, it slipped my mind but this change should have gone in extra/github-actions/, this file gets generated from there
I mentioned in the marshalling type PR that
cpp.ManagedTypeexterns could be used to un-dynamic much of the cpp std implementation, so here's an example of this using the zip api since it's relatively small.The changes here are realtively small, mostly forwarding calls into a new typed extern which contains the hxcpp implementation. I'm using the new
Viewtype in the cpp signature to allow passing any data, not just haxe arrays, to the underlying implementation.More info on the hxcpp side can be found in it's PR: HaxeFoundation/hxcpp#1277
Again, I've changed the ci to use my fork just to show the tests, since this is a bit of a chicken and the egg problem.
Assuming this goes well slowly un-dynamicing the entire cpp std is something which can now be done.