Giter Club home page Giter Club logo

gir2cl's People

Contributors

kat-co avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

provessor

gir2cl's Issues

There is no applicable method for the generic function GIR2CL::PARAMETERS for NIL

I tried to do this:

(with-output-to-string (stream)
  (gir2cl:generate "#:gtk-low-level" "Gtk" stream "/usr/share/gir-1.0/Gtk-3.0.gir"))

The result:

There is no applicable method for the generic function                                                                                           
  #<STANDARD-GENERIC-FUNCTION GIR2CL::PARAMETERS (2)>                                                                                            
when called with arguments                                                                                                                       
  (NIL).
   [Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR]
See also:
  Common Lisp Hyperspec, 7.6.6 [:section]

Restarts:
 0: [RETRY] Retry calling the generic function.
 1: [RETRY] Retry SLIME REPL evaluation request.
 2: [*ABORT] Return to SLIME's top level.
 3: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1004379B63}>)

Backtrace:
  0: ((:METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION GIR2CL::PARAMETERS (2)> NIL) [fast-method]
  1: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION GIR2CL::PARAMETERS (2)> (NIL))
  2: ((:METHOD SAX:END-ELEMENT (GIR2CL::GIR-HANDLER T T T)) #<GIR2CL::GIR-HANDLER {100E09B973}> #<unused argument> "parameter" #<unused argument$
...

The error is being thrown from here: https://github.com/kat-co/gir2cl/blob/master/src/main.lisp#L286

Contents of the HANDLER object :

#<GIR2CL::GIR-HANDLER {100E09B973}>
--------------------
Class: #<STANDARD-CLASS GIR2CL::GIR-HANDLER>
--------------------
 Group slots by inheritance [ ]
 Sort slots alphabetically  [X]

All Slots:
[ ]  ALL-SYMBOLS              = (MAKE-GTK-ABOUT-DIALOG-NEW)
[ ]  CLOS-FROM-GIR            = #<HASH-TABLE :TEST EQUALP :COUNT 1 {100E1CB1A3}>
[ ]  CURRENT-CLASS            = (defclass gtk-about-dialog (gir-object) nil)
[ ]  CURRENT-CONSTRUCTOR      = NIL
[ ]  CURRENT-METHOD           = #<unbound>
[ ]  CURRENT-PARAMETER        = uri
[ ]  NAMESPACE                = "Gtk"
[ ]  OUTPUT-STREAM            = #<SB-IMPL::STRING-OUTPUT-STREAM {100DFCC5B3}>
[ ]  SAX-PARSER               = #<CXML::CXML-PARSER {100E1CB193}>
[ ]  WITHIN-INTERFACE-ELEMENT = NIL

Community Feedback

Thanks to #lisp on freenode!

  • Newlines within lexical blocks are a smell, and maybe a reason to introduce smaller functions.
  • The GIR hierarchy at the top of main.lisp is only prefaced by 2 semicolons.
  • Prefer with-accessors to with-slots. Methods are not tied to a class, and so this private access is not as maintainable as it could be.
  • The generator is incorrectly outputing nil instead of () for an empty list of parameters or superclasses
  • The generator is incorrectly indenting in some cases (e.g. https://github.com/kat-co/cl-apache-arrow/blob/master/src/arrow-low-level.lisp#L8)

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.