Skip to content

fix(elixir-ci): run quality checks on the LTS Elixir lane#95

Closed
toshi0806 wants to merge 1 commit into
mainfrom
issue-94-credo-lts-lane
Closed

fix(elixir-ci): run quality checks on the LTS Elixir lane#95
toshi0806 wants to merge 1 commit into
mainfrom
issue-94-credo-lts-lane

Conversation

@toshi0806

Copy link
Copy Markdown
Member

概要

reusable workflow elixir-ci.ymlCode Quality ジョブを LTS レーン(Elixir 1.17.3) で実行するように変更します。Resolves #94

背景

Code Quality ジョブは mix format / mix compile --warnings-as-errors / mix credo --strictlatest レーン(1.20.1) で実行していました。credo 1.7.x が Elixir 1.20 の regex sigil(~r/.../)トークンをパースできず crash します:

** (FunctionClauseError) no function clause matching in Credo.Code.Token.position/1
    (credo 1.7.12) lib/credo/code/token.ex:37

credo のバージョンは各利用リポジトリの mix.lock 由来で reusable workflow からは固定できないため、workflow 側で打てる手は「quality チェックを走らせる Elixir バージョン」の変更のみです。

変更

  • quality ジョブの setup-beaminputs.otp-version-latest / elixir-version-latest*-lts に変更(7 insertions, 2 deletions)
  • test マトリクス(両レーン)・dialyzer(latest)は不変

trade-off: latest レーンでの --warnings-as-errors は失われますが、latest Elixir での実コンパイル・テストは test マトリクスで引き続き担保されます。新規ジョブを増やさないため、全利用リポジトリの required check 面は変わりません。

検証(E2E)

fix ブランチを smkwlab/ecosystem-manager(sigil crash の初出リポジトリ)の CI から参照して workflow_dispatch 実行:

ジョブ 結果
ci / Code Quality(credo, LTS) ✅ success
ci / Test (1.17.3) ✅ success
ci / Test (1.20.1) ✅ success
ci / Dialyzer ⏭ skipped(dispatch のため。push 時のみ実行)

以前 crash していた credo が LTS レーンで pass することを実リポジトリで確認済み。検証用の throwaway ブランチは削除済みです。

merge 後の必須手順 ⚠️

本 workflow は @v1 タグ参照です。merge 後に v1 タグをこの修正コミットへ移動しないと、ecosystem-manager 等の @v1 利用リポジトリには反映されません(タグ移動は merge 前には行いません)。

Claude-Session: https://claude.ai/code/session_01Jnvhs3pKABL6vvxj9a5ueb

The Code Quality job ran `mix credo --strict` on the latest Elixir lane
(1.20.1), where credo 1.7.x crashes tokenizing regex sigils (~r/.../):
`FunctionClauseError in Credo.Code.Token.position/1`. credo's version is
pinned by each caller's mix.lock, not this reusable workflow, so the only
lever here is the Elixir version the quality checks run on.

Point the quality job (format / compile / credo) at the LTS lane, where
credo works. Latest-Elixir compatibility is still covered by the test
matrix, which compiles and tests on the latest lane. The only thing no
longer enforced on the latest lane is `--warnings-as-errors`.

Resolves #94

Claude-Session: https://claude.ai/code/session_01Jnvhs3pKABL6vvxj9a5ueb

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コード変更の内容を確認しました。変更は明確で、PRの説明にある問題(credo 1.7.xがElixir 1.20の正規表現シジルをパースできずクラッシュする)に対する適切な対処です。

# crashes tokenizing regex sigils (~r/.../) on newer Elixir (smkwlab/.github#94),
# and credo's version is controlled by each caller's mix.lock, not this
# workflow. Real latest-Elixir compatibility is still covered by the test
# matrix below (which compiles and tests on the latest lane).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ [POSITIVE] コメントは問題の背景・理由・トレードオフを簡潔に説明しており、将来のメンテナンス性に貢献しています。良い実践です。

@toshi0806

Copy link
Copy Markdown
Member Author

検証の結果、この共通 CI 変更は不要と判断し close します。

credo の crash は上流で修正済みでした(1.7.12 → 1.7.19)。Elixir 1.20.1 で 1.7.19 は crash せず正常完走することを CI で実証しました(残る失敗は length/1 警告 7 件のみ)。

したがって正しい対処は「利用リポジトリ側で credo を最新に保つ」ことで、共通 CI を LTS に寄せて全 repo の latest レーン品質チェックを下げる本 PR は過剰です。ecosystem-manager 側の credo bump で対応します(#94 も併せて close)。

@toshi0806 toshi0806 closed this Jul 13, 2026
@toshi0806 toshi0806 deleted the issue-94-credo-lts-lane branch July 13, 2026 01:05
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.

elixir-ci: credo 1.7.12 crashes on Elixir 1.20 regex sigils (Code Quality lane)

1 participant