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

Nim 0.19 #41

Closed
rafallus opened this issue Dec 5, 2018 · 10 comments
Closed

Nim 0.19 #41

rafallus opened this issue Dec 5, 2018 · 10 comments

Comments

@rafallus
Copy link
Contributor

rafallus commented Dec 5, 2018

I'm just wondering if the bindings are going to be updated to compile with the latest nim version 0.19. As of now, there is the error:

godotapigen.nim(9, 26) Error: type mismatch: got <string>
but expected one of:
proc getIdent(ic: IdentCache; identifier: string): PIdent
proc getIdent(ic: IdentCache; identifier: string; h: Hash): PIdent
proc getIdent(ic: IdentCache; identifier: cstring; length: int; h: Hash): PIdent

expression: getIdent(ident)

which can be solved as mentioned in #32 (comment). But after that, there are still errors regarding string nil checks (strings can't be nil anymore in 0.19). And even if I use the option --nilseqs:on for backwards compatibility other errors show up. I would love to see the Nim bindings updated,

@zetashift
Copy link
Contributor

On the gitter/irc chat @endragor is saying the update will be made soon(TM). However it's because they want to keep the update backwards compatible it can't be done easily I think(they're using it in production).
Currently I'm just using 0.18 as choosenim doesn't work on windows 64bit, so I'd also like to see the update.

@zetashift
Copy link
Contributor

@endragor anyway we can contribute, maybe start a branch?

@bluenote10
Copy link
Contributor

Any news on this?

I also gave it try, but it is probably not enough to replace the isNil with empty string checks, because some usages actually require nullable semantics. Probably Option[strings] are required.

I got to the point where the API produces syntax like

proc setIterationsPerSecond*(iterationsPerSecond: int64):  {.gcsafe, locks: 0.}
proc setIterationsPerSecond(iterationsPerSecond: int64):  =
  ...

which is syntactically invalid because it is missing the void return type. Either a consequence of missing nil semantics or pre-0.19 did allow that syntax...

@zetashift
Copy link
Contributor

@endragor anyway who could get some updates? I'm getting {.this.} pragma deprecrated all over my editor. Doesn't need to be a full blown update, maybe a simple a message about we could go further?

@Zireael07
Copy link

Any news?

@Skaruts
Copy link

Skaruts commented Mar 24, 2019

Speaking of updates, if you don't mind me asking here, I'd like to know if these bindings are planned to also work with Godot 3.1 in the foreseeable future? (I can't use 3.0 because I need gles2.)

@adrianperreault
Copy link

@Skaruts, they currently work with Godot 3.1 : ) see #42

@Zireael07
Copy link

#42 is not merged yet, any reasons why?

@adrianperreault
Copy link

@Zireael07, the main author of the bindings has commercial code in production that's on an earlier Nim version.

@Zireael07
Copy link

I thought it was something to do with the PR itself :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants