Gnimuc / CImGui.jl

Julia wrapper for cimgui
https://github.com/cimgui/cimgui
MIT License
253 stars 25 forks source link

`AddRect()` error: "`ImDrawCornerFlags_All` not defined" #117

Closed heyx3 closed 3 months ago

heyx3 commented 3 months ago

In Julia 1.9.2, CImGui 1.82.0:

julia> using CImGui
julia> CImGui.AddRect(Ptr{CImGui.ImDrawList}(C_NULL), CImGui.ImVec2(0.5, 0.5), CImGui.ImVec2(10, 20), 0x1234)

ERROR: UndefVarError: `ImDrawCornerFlags_All` not defined

Presumably it should be ImDrawFlags_RoundCornersAll

JamesWrigley commented 3 months ago

Thanks for the report, could you try my branch in #118 and see if that fixes it? If so I'll merge it and tag a new release.

heyx3 commented 3 months ago

Yep! No longer errors on my machine

heyx3 commented 3 months ago

I really wish Julia had some kind of static analyzer to warn of potential unknown variable accesses :\

JamesWrigley commented 3 months ago

Alrighty, the new version should be available soon: https://github.com/JuliaRegistries/General/pull/108414

I really wish Julia had some kind of static analyzer to warn of potential unknown variable accesses :\

Yeah I agree. What we really need is proper tests (#98), but in the meantime maybe JET.jl might be of use to find those kind of errors :thinking: In the past it's been a little spammy but maybe there are some settings to only look for obvious errors like unknown variables.