Skip to content

Update ameba dependency#1394

Draft
botantony wants to merge 1 commit into
amberframework:masterfrom
botantony:update-ameba-dep
Draft

Update ameba dependency#1394
botantony wants to merge 1 commit into
amberframework:masterfrom
botantony:update-ameba-dep

Conversation

@botantony

Copy link
Copy Markdown

Description of the Change

With the latest Crystal update to 1.21.0 the project fails to build ameba dependency. Here's the error that happens after running shards install:

Failed postinstall of ameba on shards build -Dpreview_mt:
I: Dependencies are satisfied
I: Building: ameba
E: Error target ameba failed to compile:
The 'preview_mt' flag is deprecated. Resize the default execution context, or start additional contexts instead.

In src/ameba/rule/base.cr:117:34

 117 | source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }}
                                  ^
Warning: Deprecated use of splat operator. Use `#splat` instead

In src/ameba/rule/base.cr:117:48

 117 | source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }}
                                                ^
Warning: Deprecated use of double splat operator. Use `#double_splat` instead

A total of 3 warnings were found.
Showing last frame. Use --error-trace for full trace.

In src/ameba/tokenizer.cr:88:15

 88 | lexer.next_string_array_token
            ^----------------------
Error: undefined method 'next_string_array_token' for Crystal::Lexer (compile-time type is Crystal::Lexer+)

This was fixed by the upstream but there's no tagged release with the patch yet, so switching to master branch

Benefits

Latest stable compiler support

Possible Drawbacks

The dependency is not pinned

References

With the latest Crystal update to 1.21.0 the project fails to build
`ameba` dependency. Here's the error that happens after running
`shards install`:
```
Failed postinstall of ameba on shards build -Dpreview_mt:
I: Dependencies are satisfied
I: Building: ameba
E: Error target ameba failed to compile:
The 'preview_mt' flag is deprecated. Resize the default execution context, or start additional contexts instead.

In src/ameba/rule/base.cr:117:34

 117 | source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }}
                                  ^
Warning: Deprecated use of splat operator. Use `#splat` instead

In src/ameba/rule/base.cr:117:48

 117 | source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }}
                                                ^
Warning: Deprecated use of double splat operator. Use `#double_splat` instead

A total of 3 warnings were found.
Showing last frame. Use --error-trace for full trace.

In src/ameba/tokenizer.cr:88:15

 88 | lexer.next_string_array_token
            ^----------------------
Error: undefined method 'next_string_array_token' for Crystal::Lexer (compile-time type is Crystal::Lexer+)
```

This was fixed by the upstream but there's no tagged release
with the patch yet, so switching to `master` branch

References:
- crystal-ameba/ameba#823
- Homebrew/homebrew-core#293531

Signed-off-by: botantony <antonsm21@gmail.com>
@botantony
botantony marked this pull request as draft July 18, 2026 01:19
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

Successfully merging this pull request may close these issues.

1 participant