haskell-game / dear-imgui.hs

Haskell bindings to Dear ImGui, an immediate mode GUI toolkit
BSD 3-Clause "New" or "Revised" License
142 stars 31 forks source link

Update to 1.87 #124

Closed dpwiz closed 2 years ago

dpwiz commented 2 years ago

https://github.com/ocornut/imgui/releases/tag/v1.87

There are some breaking changes and the generator is failing:

generator/DearImGui/Generator.hs:72:11: error:
    • Exception when trying to run compile-time code:
        Couldn't parse Dear ImGui headers:

offset=9459:
Couldn't lookup the following values in enum ImGuiKey_:
 - ImGuiKey_COUNT

Number 512.0 ""
ReservedSymbol ','
Identifier "ImGuiKey_NamedKey_END"
ReservedSymbol '='
Identifier "ImGuiKey_COUNT"

ReservedSymbol ','
Identifier "ImGuiKey_NamedKey_COUNT"
ReservedSymbol '='
Identifier "ImGuiKey_NamedKey_END"
Symbolic "-"
Identifier "ImGuiKey_NamedKey_BEGIN"
ReservedSymbol ','
BeginCPP "ifdef"
Identifier "IMGUI_DISABLE_OBSOLETE_KEYIO"
EndCPPLine
Identifier "ImGuiKey_KeysData_SIZE"
ReservedSymbol '='
Identifier "ImGuiKey_NamedKey_COUNT"
ReservedSymbol ','
Comment "Size of KeysData[]: only hold named keys"

CallStack (from HasCallStack):
  error, called at generator/DearImGui/Generator.hs:87:9 in dear-imgui-1.3.1-inplace-dear-imgui-generator:DearImGui.Generator
      Code: do currentPath <- TH.loc_filename <$> TH.location
               basicHeaders <- TH.runIO
                                 do headersPath <- canonicalizePath
                                                     (takeDirectory currentPath
                                                        <> "/../../imgui/imgui.h")
                                    ....
               TH.lift $ generateNames basicHeaders
    • In the untyped splice:
        $(do currentPath <- TH.loc_filename <$> TH.location
             basicHeaders <- TH.runIO
                               do headersPath <- canonicalizePath
                                                   (takeDirectory currentPath
                                                      <> "/../../imgui/imgui.h")
                                  headersSource <- Text.readFile headersPath
                                  ....
             TH.lift $ generateNames basicHeaders)
   |
72 | headers = $( do
   |           ^^^^^...
dpwiz commented 2 years ago

Closedwith #125