crystal-lang / crystal_lib

Automatic binding generator for native libraries in Crystal
138 stars 30 forks source link

Fails to generate examples. #24

Closed zcassini closed 8 years ago

zcassini commented 8 years ago

I've tried version 16, 17.4, 18.0 and get the same error. I get this error with all the examples.

Running with this command: crystal src/main.cr -- examples/lib_curses.cr

Gives these results:

Error in ./src/main.cr:6: instantiating 'Crystal::ASTNode+#transform(CrystalLib::LibTransformer)'

transformed = node.transform visitor
                   ^~~~~~~~~

in /opt/crystal/src/compiler/crystal/syntax/transformer.cr:7: instantiating 'CrystalLib::LibTransformer#transform(Crystal::ASTNode+)'

      node = transformer.transform self
                         ^~~~~~~~~

in ./src/crystal_lib/lib_transformer.cr:17: instantiating 'process_includes()'

    headers, flags, prefixes, remove_prefix = process_includes
                                              ^~~~~~~~~~~~~~~~

in ./src/crystal_lib/lib_transformer.cr:36: instantiating 'Array(Crystal::Attribute)#each()'

    @includes.each do |attr|
              ^~~~

in /opt/crystal/src/array.cr:813: instantiating 'each_index()'

    each_index do |i|
    ^~~~~~~~~~

in /opt/crystal/src/array.cr:813: instantiating 'each_index()'

    each_index do |i|
    ^~~~~~~~~~

in ./src/crystal_lib/lib_transformer.cr:36: instantiating 'Array(Crystal::Attribute)#each()'

    @includes.each do |attr|
              ^~~~

in ./src/crystal_lib/lib_transformer.cr:37: instantiating 'Array(Crystal::ASTNode+)#each()'

      attr.args.each do |arg|
                ^~~~

in /opt/crystal/src/array.cr:813: instantiating 'each_index()'

    each_index do |i|
    ^~~~~~~~~~

in /opt/crystal/src/array.cr:813: instantiating 'each_index()'

    each_index do |i|
    ^~~~~~~~~~

in ./src/crystal_lib/lib_transformer.cr:37: instantiating 'Array(Crystal::ASTNode+)#each()'

      attr.args.each do |arg|
                ^~~~

in ./src/crystal_lib/lib_transformer.cr:42: undefined method 'raise' for Crystal::Nop (compile-time type is Crystal::ASTNode+)

          arg.raise "Include attribute value must be a string literal"
              ^~~~~
asterite commented 8 years ago

Thanks for letting us know! :-)