fix: update ameba to commit 4057e0c5 for Crystal 1.21 compatibility#48
Merged
Conversation
Ameba v1.6.4 uses next_string_array_token which was removed in Crystal 1.21.0. The fix in ameba@4057e0c5 uses responds_to? to gracefully handle both old and new Crystal versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что
Ameba v1.6.4 использует метод
next_string_array_tokenуCrystal::Lexer, который был удалён в Crystal 1.21.0. Это вызывало ошибку компиляции в CI.Что сделано
shard.yml:tag: v1.6.4→commit: 4057e0c5shard.lockпод новый коммитStyle/HeredocIndentчерез.ameba.yml— оно циклично срабатывало (--fixписал[Corrected], но при повторном запуске снова выдавал failure), баг в dev-версии amebaКоммит
4057e0c5(PR crystal-ameba/ameba#823) добавляет проверкуresponds_to?(:next_string_array_token)вTokenizer#run_array_stateи fallback наnext_string_tokenдля Crystal >= 1.21.Проверка
crystal bin/ameba.cr— 0 failurescrystal spec— 46 examples, 0 failures, 0 errors