crystal-ameba / ameba

A static code analysis tool for Crystal
https://crystal-ameba.github.io
MIT License
521 stars 38 forks source link

Specs fail with Crystal 1.8.1 #371

Closed manveru closed 1 year ago

manveru commented 1 year ago

Output from nix build github:manveru/crystal-flake/67ab9e98e2075d1c166fe610176a926edad7068c#ameba

shards build --release --progress --verbose --no-debug
Dependencies are satisfied
Building: ameba
crystal build -o /build/source/bin/ameba src/cli.cr --verbose --release --progress --no-debug
gcc _main.o -o /build/source/bin/ameba  -rdynamic -L/nix/store/nkc8cazm7wxdfgqkahf0g6sh2sdc2kzd-boehm-gc-8.2.2/lib -L/nix/store/yib6jilwxf4lj8niz24vxg3f46rjh6yg-gmp-with-cxx-6.2.1/lib -L/nix/store/icmm0jx9al1dhr60fh4mmvi5sqxl6wh9-libevent-2.1.12/lib -L/nix/store/yslcn8vg16ww8015hm8rw0c6aj8m18rx-libxml2-2.10.3/lib -L/nix/store/rssikibz39xrprln6q7igdr85z9cvg9r-libyaml-0.2.5/lib -L/nix/store/bhfrryys2chgjnzlrqscxd0419vxirfx-openssl-3.0.8/lib -L/nix/store/002hca149igknml8zp2r293phz7bffcf-pcre2-10.40/lib -L/nix/store/8k8lfynqwb32dbkw04z8wzjaza6884kv-readline-6.3p08/lib -L/nix/store/fblaj5ywkgphzpp5kx41av32kls9256y-zlib-1.2.13/lib -L/nix/store/rssikibz39xrprln6q7igdr85z9cvg9r-libyaml-0.2.5/lib -lyaml -lpcre2-8 -lm -lgc -lpthread -L/nix/store/icmm0jx9al1dhr60fh4mmvi5sqxl6wh9-libevent-2.1.12/lib -levent -lrt -lpthread -ldl
buildPhase completed in 2 minutes 12 seconds
running tests
crystal spec
Showing last frame. Use --error-trace for full trace.

There was a problem expanding macro 'macro_140736843139040'

Code in /nix/store/sifgh7l67q5l65rbilp9awixf3i0rbc8-crystal-1.8.1-lib/crystal/yaml/serialization.cr:188:7

 188 | {% begin %}
       ^
Called macro defined in /nix/store/sifgh7l67q5l65rbilp9awixf3i0rbc8-crystal-1.8.1-lib/crystal/yaml/serialization.cr:188:7

 188 | {% begin %}

Which expanded to:

 > 31 | begin
 > 32 |    begin
 > 33 |     __temp_4630 =
            ^
Error: type must be Ameba::Severity, not (Ameba::Severity | Nil)
make: *** [Makefile:17: spec] Error 1
straight-shoota commented 1 year ago

This is probably #366 and fixed in ameba 1.5.0

veelenga commented 1 year ago

Yes, and Ameba v1.5.0 is coming.

Sija commented 1 year ago

Duplicate of #366