Giter Club home page Giter Club logo

Comments (6)

genotrance avatar genotrance commented on May 24, 2024 1

This is finally fixed. With the latest commit, you get a decent error message.

Error: unhandled exception: /nimterop/nimterop/getters.nim(127, 5) `not hasKey(existing, nimName)`
Identifier 'SDL_GL_CONTEXT_RESET_NOTIFICATION' is a stylistic duplicate of identifier 'SDL_GLContextResetNotification', use 'cPlugin:onSymbol()' to rename [AssertionError]

User is expected to skip the problematic symbol or rename using plugin.

from nimterop.

zevv avatar zevv commented on May 24, 2024

Another example from GLES2: GL_BYTE and GLbyte origination from typedef khronos_int8_t GLbyte; and #define GL_BYTE 0x1400

from nimterop.

genotrance avatar genotrance commented on May 24, 2024

@Araq - do you have any suggestions on how to differentiate these two? Here's the current output from nimterop:

type SDL_GLContextResetNotification* = distinct int
converter enumToInt(en: SDL_GLContextResetNotification): int {.used.} = en.int

type SDL_GLattr* = distinct int
converter enumToInt(en: SDL_GLattr): int {.used.} = en.int

const
  headerb = "b.h"
  abc* = 0.SDL_GLContextResetNotification
  SDL_GL_CONTEXT_RESET_NOTIFICATION* = 0.SDL_GLattr

from nimterop.

Araq avatar Araq commented on May 24, 2024

the const is lowercase, the type Uppercase.

from nimterop.

timotheecour avatar timotheecour commented on May 24, 2024

concrete proposals discussed here: https://github.com/genotrance/nimterop/wiki/identifier-mapping-proposal along with the approach I recommend: see proposal 4

from nimterop.

genotrance avatar genotrance commented on May 24, 2024

The new plugin system will allow the user to rename these problematic symbols per their preference. There's no clear solutions from the Nim compiler itself but we can at least allow the user to handle this situation for now. Nimterop will aim to provide clear errors and guidance so that users can figure out such situations clearly.

from nimterop.

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.