Closed JamesWrigley closed 7 months ago
I'll try fixing the docs, but I have no idea what's going on with the Windows CI :eyes: AFAICT it seems unrelated?
Well, that was a bit of a rabbit hole :upside_down_face: TL;DR:
callback_documentation
as a fallback even when extract_c_comment_style
is set (5c78b0a).Hmph, now I know why the windows tests are failing... 7zip was recently moved to a different directory, which is used by BinDeps.jl, which is used by CMake.jl, which is used by our tests: https://github.com/JuliaLang/julia/pull/48931
That was backported to 1.9, which is why the Julia 1
tests are failing too and not just nightly. Relevant issue: https://github.com/JuliaPackaging/CMake.jl/issues/23
Ok, got there in the end :tada: Main fix was switching to CMake_jll in 31876f0, and then some other minor fixes in 3afee34 and 61f1c48.
Thanks for fixing this! I'll give it a test and update the test-suite: https://github.com/Gnimuc/GeneratorScripts
emit!()
forTypedefMutualRef
will create some specializations ofBase.unsafe_convert()
, and previously they didn't declare a type for theRef
/Ptr
value being passed to them, which would cause a method ambiguity with Base (detected by Aqua.jl).The problem is that the typedef will of course be declared in the C header before the struct it references, so the
Base.unsafe_convert()
specializations couldn't use the actual struct type in their signature because it won't have been created yet. This commit fixes that with the notion of a partially emitted node that contains premature exprs that haven't been emitted yet. Nowemit!()
forTypedefMutualRef
will record theBase.unsafe_convert()
methods as premature exprs and mark itself as a partially emitted node. Then later,emit!()
for theStructDefinition
will look for any partially emitted nodes that are marked for it and emit their premature expressions itself.Before:
After:
I'm not sure why there's no newline after the struct definition :thinking: