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

Creating template and building doesn't seem to be working #101

Closed
jordo opened this issue Oct 11, 2024 · 5 comments
Closed

Creating template and building doesn't seem to be working #101

jordo opened this issue Oct 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@jordo
Copy link

jordo commented Oct 11, 2024

Jordans-M3-MacBook-Pro:game jordanschidlowsky$ gdextwiz new-extension game2
wizard new-extension*     Info: new-extension is activated 
wizard new-extension*     Info: project.godot found 
wizard new-extension*  Success: create directory nim/game2 
Jordans-M3-MacBook-Pro:game jordanschidlowsky$ gdextwiz  build-all
wizard build-all*     Info: using /Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/project.godot 
wizard build-all*     Info: build /Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/nim/game2/bootstrap.nim 
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.0/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.0/nim/config/config.nims' [Conf]
Hint: used config file '/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/nim/game2/config.nims' [Conf]
..............................................................................................................................................................................................
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/surface/userclass.nim(83, 92) template/generic instantiation of `gdcall` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/surface/userclass.nim(84, 54) template/generic instantiation of `getOrDefault` from here
/opt/homebrew/Cellar/nim/2.2.0/nim/lib/pure/collections/tables.nim(437, 19) Error: type mismatch: got <typedesc[ClassCallVirtual]>
but expected one of:
ClassCallVirtual = proc (p_instance: ClassInstancePtr, p_args: ptr UncheckedArray[ConstTypePtr], r_ret: TypePtr){.cdecl.}

Thoughts?

@jordo
Copy link
Author

jordo commented Oct 11, 2024

Hmmm, seems like it's fixed here: nim-lang/Nim#24265

@jordo
Copy link
Author

jordo commented Oct 11, 2024

Compiling nim from latest 2.2.0 src, now running into this:

Jordans-M3-MacBook-Pro:game2 jordanschidlowsky$ gdextwiz build
wizard build*     Info: using /Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/nim/game2/bootstrap.nim 
Hint: used config file '/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/Nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/Nim/config/config.nims' [Conf]
Hint: used config file '/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/nim/game2/config.nims' [Conf]
......................................................................................................................................................................................................
stack trace: (most recent call last)
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/core/gdclass.nim(120, 46) Super
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/utils/macros.nim(142, 14) super
/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/Nim/lib/pure/collections/tables.nim(381, 22) contains
/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/Nim/lib/pure/collections/tables.nim(371, 18) hasKey
/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/Nim/lib/pure/collections/hashcommon.nim(59, 12) rawGet
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/utils/macros.nim(21, 44) hash
/Users/jordanschidlowsky/WINTERPIXEL/PROJECTS/ballz/game/nim/game2/bootstrap.nim(16, 1) template/generic instantiation of `GDExtension_EntryPoint` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/surface/init.nim(44, 70) template/generic instantiation of `gdcall` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/surface/init.nim(52, 30) template/generic instantiation of `initializeExtensionMain` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/extclasses/gdextensionmain.nim(24, 3) template/generic instantiation of `register` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/surface/userclass.nim(133, 101) template/generic instantiation of `Super` from here
/Users/jordanschidlowsky/.nimble/pkgs2/gdext-0.2.0-f8d25a2473361c28332ebd98cdfd407dccd9c81c/gdext/utils/macros.nim(21, 44) Error: node is not a symbol```

@panno8M panno8M linked a pull request Oct 12, 2024 that will close this issue
@panno8M
Copy link
Member

panno8M commented Oct 12, 2024

@jordo
We have revised the stack traces based on that you sent.
Regarding the error about getOrDefault, may I ask you to check the behavior, as I could not reproduce it in my Linux environment, probably because it is Mac-specific.

You can install the patched version with the following command:

nimble uninstall gdext
nimble install https://github.com/godot-nim/gdext-nim@#101-creating-template-and-building-doesnt-seem-to-be-working

EDIT:
If the fixes are correct, it should compile with both Nim2.0 and Nim2.2 series.

@panno8M panno8M added the bug Something isn't working label Oct 14, 2024
@jordo
Copy link
Author

jordo commented Oct 17, 2024

I got it working as well by removing that , nil so can confirm this should be working with nim 2.2 now.

@panno8M
Copy link
Member

panno8M commented Oct 17, 2024

Alright, thanks for your report. I close the issue with my appreciation for your contribution.

@panno8M panno8M closed this as completed Oct 17, 2024
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

2 participants