fix: Elixir 1.20.1 compatibility (pin operator in size/1, credo 1.7.19) - #34
Merged
Conversation
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.
背景
共有 CI ワークフローの latest を OTP 29.0.2 / Elixir 1.20.1 へ更新(smkwlab/.github#65)し、本リポも
@v1追従(#32)した結果、Code Quality ジョブが Elixir 1.20.1 で失敗することが判明したため対応する。変更内容
1. pin operator(
lib/elixir_dnstap/frame_streams.ex3箇所)Elixir 1.20 から、match の外(関数ヘッド)で束縛した変数を bitstring の
size(...)内で使う場合に pin operator^が必須に(未対応だと警告 →--warnings-as-errorsでエラー)。いずれも関数ヘッドで束縛済みの値を使うため挙動は不変。
2. credo 1.7.12 → 1.7.19(
mix.lock)credo 1.7.12 は Elixir 1.20.1 で
@moduledocの検出に失敗し、ほぼ全モジュールに対し「Modules should have a @moduledoc tag」を false positive(23件)として報告していた。1.7.18 の「Fix compatibility & compiler warnings with Elixir 1.20」で解消されるため最新 1.7.19 へ更新。検証(ローカル、Elixir 1.20.1 / OTP 29)
mix compile --warnings-as-errors✅mix credo --strict✅(false positive 解消・no issues)mix test✅