Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on macro expansion when building with Crystal 1.9.0 #389

Closed
mrexox opened this issue Jul 12, 2023 · 2 comments
Closed

Error on macro expansion when building with Crystal 1.9.0 #389

mrexox opened this issue Jul 12, 2023 · 2 comments

Comments

@mrexox
Copy link

mrexox commented Jul 12, 2023

I have upgraded Crystal version to the new 1.9.0 and got this error (logs):

Building: ameba
Error target ameba failed to compile:
Showing last frame. Use --error-trace for full trace.

There was a problem expanding macro 'macro_139947943079200'

Code in /home/runner/work/_temp/crystal-1.9-true-undefined/share/crystal/src/yaml/serialization.cr:188:7

 188 | {% begin %}
       ^
Called macro defined in /home/runner/work/_temp/crystal-1.9-true-undefined/share/crystal/src/yaml/serialization.cr:188:7

 188 | {% begin %}

Which expanded to:

 > 69 |                   
 > 70 | 
 > 71 |                   __temp_722 =
                          ^
Error: type must be Ameba::Severity, not (Ameba::Severity | Nil)

I guess that ameba hasn't yet been tested against Crystal 1.9, so I report this issue. I'll be glad to provide any help from my side.

@Sija
Copy link
Member

Sija commented Jul 12, 2023

It should be fixed in master.
Soon I'll release v1.5.0.

@Sija
Copy link
Member

Sija commented Jul 13, 2023

Duplicate of #372

@Sija Sija marked this as a duplicate of #372 Jul 13, 2023
@Sija Sija closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2023
will added a commit to CrunchyData/nixpkgs that referenced this issue Jul 17, 2023
It can't compile on crystal 1.9+ but has been fixed after v1.4.3. A new
release is coming 'soon' though, but this blocks easliy going to
crystal 1.9. It would be possible to have the flake build ameba with 1.8
and have the default crystal be 1.9, but that's more work.

ref: crystal-ameba/ameba#389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants