Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generation failed while generating openxr_structs.hpp #39

Closed
TheZeury opened this issue Apr 12, 2023 · 3 comments
Closed

Generation failed while generating openxr_structs.hpp #39

TheZeury opened this issue Apr 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@TheZeury
Copy link

    return concat(self.root_render_func(self.new_context(vars)))
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-Hpp\scripts\template_openxr_structs.hpp", line 56, in root
    * but no specific type enum value of their own: these are the "base structs" in OpenXR.
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-Hpp\scripts\struct.hpp", line 316, in root
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-SDK-Source\external\python\jinja2\runtime.py", line 262, in call
    return __obj(*args, **kwargs)
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-SDK-Source\external\python\jinja2\runtime.py", line 570, in __call__
    return self._invoke(arguments, autoescape)
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-SDK-Source\external\python\jinja2\asyncsupport.py", line 110, in _invoke
    return original_invoke(self, arguments, autoescape)
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-SDK-Source\external\python\jinja2\runtime.py", line 574, in _invoke
    rv = self._func(*arguments)
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-Hpp\scripts\struct.hpp", line 126, in macro
    /*{ _makeDefaultConstructor(s) }*/
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-SDK-Source\external\python\jinja2\runtime.py", line 262, in call
    return __obj(*args, **kwargs)
  File "C:\Users\Zeury\Documents\GitHub\OpenXR-Hpp\scripts\cpp_generator.py", line 1002, in _index0_of_first_visible_defaultable_member
    raise RuntimeError("Found a non-defaultable member, errors possible elsewhere due to untested codepath.")
RuntimeError: Found a non-defaultable member, errors possible elsewhere due to untested codepath.
Generation failed while generating openxr_structs.hpp :
At C:\Users\Zeury\Documents\GitHub\OpenXR-Hpp\generate-openxr-hpp.ps1:58 char:9
+         throw "Generation failed while generating ${header} : ${proce ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Generation fail..._structs.hpp : :String) [], RuntimeException
    + FullyQualifiedErrorId : Generation failed while generating openxr_structs.hpp :

Tried a previous commit of OpenXR-SDK-Source (https://github.com/KhronosGroup/OpenXR-SDK-Source/tree/033c76dd7561730de3aee3ef623e9e5be6f551df), works fine. Probably something has broken in the 1.0.27 update?

@rpavlik
Copy link
Contributor

rpavlik commented Apr 12, 2023

Aww crap, happens every time I forget to test openxr-hpp with a new release 🤦 . I don't see what object it's trying to make - I'll take a look later. Presumably somebody added a vendor extension with a weird type in it that the wrapper doesn't know how to default-init.

@rpavlik rpavlik added the bug Something isn't working label Apr 12, 2023
@jherico
Copy link
Collaborator

jherico commented Nov 1, 2023

The issue is that XR_FB_spatial_entity added XrAsyncRequestIdFB but didn't define a XR_NULL_ASYNC... constant to go with it, so it's considered non-defaultable and therefore crashes the generator. I managed to fix it by having atom types default to "0" instead of returning None.

@rpavlik
Copy link
Contributor

rpavlik commented Nov 3, 2023

This appears to be working fine now with the above fix (plus more fixes).

@rpavlik rpavlik closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants