Giter Site home page Giter Site logo

Comments (13)

zacharycarter avatar zacharycarter commented on August 15, 2024 2

I think there are two separate issues being discussed now - one regarding choosenim and pinned compiler versions and another regarding API codgen errors.

The latter issue can be solved by changing any calls to getIdent in godotapigen.nim to include an indentCache.

I created one in this file - var gic* = newIdentCache() - and then used it as the first argument to all getIdent calls in that file. With 0.18.0, this code compiled fine.

I can issue a PR if desired

from godot-nim.

endragor avatar endragor commented on August 15, 2024

devel gets breaking changes all the time, I intend to apply fixes once the new version is released. Also, when using devel, remember to install latest Nim compiler to the nimble repo: do nimble install from Nim's folder. That should fix your first error.

from godot-nim.

rama0x9 avatar rama0x9 commented on August 15, 2024

not working on first error, after doing nimble install in the devel folder ~.choosenim/toolchains/nim-#devel/ and then nake build i get

[...]
Hint: rodutils [Processing]
/home/rama/.nimble/pkgs/godot-0.7.14/godotapigen.nim(9, 26) Error: type mismatch: got <string>
but expected one of: 
proc getIdent(self: IdentCache; identifier: string): PIdent
proc getIdent(self: IdentCache; identifier: string; h: Hash): PIdent
proc getIdent(self: IdentCache; identifier: cstring; length: int; h: Hash): PIdent

expression: getIdent(ident)

I understand that it's tedious to keep up with the regular changes on devel, so don't worry, i don't need the latest. I only need a working devel build because there are some nim packages which require >0.18.1 and i want to use them.

from godot-nim.

endragor avatar endragor commented on August 15, 2024

Did you also nake clean after installing the devel? nakefile needs to be recompiled since it depends on Nim compiler through godot API generator module.

from godot-nim.

rama0x9 avatar rama0x9 commented on August 15, 2024

sure, it's the first thing i do if something not working.
But in this case with compiler 0.18.1, nake clean breaks everything because if i build with stable, switch to devel and build without clean, it compiles.
But If i clean with stable, switch to devel and then build, this error happens, now both nake build & nake clean are showing that error, even after i switch back to stable. To make it work again i need to remove compiler 0.18.1

from godot-nim.

Zireael07 avatar Zireael07 commented on August 15, 2024

I am having the same error:
/home/rama/.nimble/pkgs/godot-0.7.14/godotapigen.nim(9, 26) Error: type mismatch: got
but expected one of:
proc getIdent(self: IdentCache; identifier: string): PIdent
proc getIdent(self: IdentCache; identifier: string; h: Hash): PIdent
proc getIdent(self: IdentCache; identifier: cstring; length: int; h: Hash): PIdent

expression: getIdent(ident)

from godot-nim.

zetashift avatar zetashift commented on August 15, 2024

@Zireael07 are you using Nim v0.18 or 0.19?

from godot-nim.

Zireael07 avatar Zireael07 commented on August 15, 2024

0.18
(The docs page for the bindings says >= 0.18 is fine)

from godot-nim.

zetashift avatar zetashift commented on August 15, 2024

@Zireael07 I can't reproduce your error. I cloned the godot-nim-stub and ran nake build and it compiles fine. Using v0.18 and windows 10

from godot-nim.

zetashift avatar zetashift commented on August 15, 2024
..\..\..\.nimble\pkgs\godot-0.7.17\internal\godotstrings.nim(41, 8) Error: usage of 'isNil' is a user-defined error
       Tip: 11 messages have been suppressed, use --verbose to show them.

Yeah, hoping that fixing the 0.19 changes will be easy. Will the new version also work with 3.1?

from godot-nim.

zetashift avatar zetashift commented on August 15, 2024

Most of the fixing I could do was change the isNil's and equals to an empty seq and empty string.
Should I make a PR so far with my progress or do you already have a branch up endragor?

from godot-nim.

dom96 avatar dom96 commented on August 15, 2024

Pro Tip: The Nim compiler sources are a moving target, pin the compiler package version to something that works and you won't have issues like this again. (For example requires "compiler#mygithash")

from godot-nim.

jrenner avatar jrenner commented on August 15, 2024

Hi, I'm running into the .nimble/pkgs/godot-0.7.17/godotapigen.nim(9, 26) Error: type mismatch: got <string> error. What's the best way to deal with this currently?

from godot-nim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.