Skip to content

fix(ci): keep zorphy_annotation path override in dart.yml analyzer_compat - #165

Merged
arrrrny merged 1 commit into
masterfrom
fix/issue-164
Nov 16, 2026
Merged

arrrrny merged 1 commit into
masterfrom
fix/issue-164

Conversation

@arrrrny

@arrrrny arrrrny commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Root cause

.github/workflows/dart.yml (the push-triggered workflow) has an
analyzer_compat job whose Pin analyzer ${{ matrix.analyzer }}.x step writes
zorphy/pubspec_overrides.yaml with > — truncating the tracked file:

# zorphy/pubspec_overrides.yaml (committed)
dependency_overrides:
  zorphy_annotation:
    path: ../zorphy_annotation

Both legs of the pin step then wrote only the analyzer pin, so the path entry
was gone by the time dart pub get ran. zorphy/pubspec.yaml declares
zorphy_annotation: ^2.5.0, and 2.5.0 is not published (pub.dev latest is
2.4.6), so the resolve fell through to pub.dev and failed:

Because zorphy depends on zorphy_annotation ^2.5.0 which doesn't match any
versions, version solving failed.

.github/workflows/ci.yaml (the pull_request gate) already carried
zorphy_annotation: path: ../zorphy_annotation in both legs of the same step —
which is exactly why branch CI was green while every master commit since
58f07bc6 was red on analyzer_compat (13) / analyzer_compat (14). The
analyze_and_test job stayed green because it never overwrites the file.

Fix

One step, mirroring ci.yaml: the zorphy_annotation path entry is repeated
in both legs of dart.yml's pin step, plus a comment recording why the >
truncation makes that repetition necessary. No dependency, version or test
change; no generated file touched.

Before / after evidence

Reproduced the reported symptom on master (13a95c4) exactly as CI runs it:

  • red — cd zorphy && printf 'dependency_overrides:\n analyzer: ^13.0.0\n' > pubspec_overrides.yaml && dart pub get
    → Because zorphy depends on zorphy_annotation ^2.5.0 which doesn't match any versions, version solving failed. (exit 1)

With the fix, both matrix legs run the same step body and resolve:

  • green (analyzer 13) — dart pub get → ! analyzer 13.3.0 (overridden in ./pubspec_overrides.yaml) / ! zorphy_annotation 2.5.0 from path ../zorphy_annotation (overridden in ./pubspec_overrides.yaml); Verify resolved analyzer major → resolved analyzer: 13.3.0 / OK
  • green (analyzer 14) — dart pub get → ! analyzer 14.7.0 (overridden …) / ! json_serializable 7.0.0-wip from git … / ! zorphy_annotation 2.5.0 from path ../zorphy_annotation (overridden …); Verify resolved analyzer major → resolved analyzer: 14.7.0 / OK
  • green (analyzer 14, full job) — dart analyze lib → No issues found!; dart run build_runner build --delete-conflicting-outputs (example) → Built with build_runner/aot in 46s; wrote 178 outputs.; dart test -j 2 → +374: All tests passed!
  • the step body is also syntax-checked for both legs (bash -n on the rendered script: OK) and dart.yml parses as YAML.

Closes #164

Summary by CodeRabbit

  • Chores
    • Updated automated Dart analysis checks to use the local annotation package in both supported analyzer configurations. The analyzer-specific settings remain in place, while the package setup is now consistent across the two branches. This improves consistency in the project’s automated validation without changing app features or behavior.

…mpat

The analyzer_compat job overwrites the tracked zorphy/pubspec_overrides.yaml
with '>', dropping its zorphy_annotation path entry, so dart pub get resolves
zorphy_annotation ^2.5.0 from pub.dev (latest 2.4.6) and version solving fails
on every push to master. Mirror ci.yaml and carry the path entry in both legs.

Closes #164
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Dart analyzer compatibility workflow now writes a local zorphy_annotation path override in both analyzer matrix branches. The existing analyzer pins and the analyzer 14 json_serializable override remain.

Changes: Dart CI Dependency Resolution

Layer / File(s) Summary
Add local annotation package override
.github/workflows/dart.yml
Both analyzer branches now include the local zorphy_annotation path override. Existing analyzer pins and the analyzer 14 json_serializable override remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: bug

Merge Risk: Minimal · up to aac07

This restores the analyzer compatibility CI job's dependency resolution by keeping the local annotation package override. It has no effect on production behavior, and the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: it restores the zorphy_annotation path override in the analyzer_compat step of .github/workflows/dart.yml. The raw summary confirms both analyzer matrix branches now includ…
Linked Issues check Passed Issue #164 requires the Pin analyzer step in the analyzer_compat job of .github/workflows/dart.yml to write the zorphy_annotation path override in both matrix branches, matching ci.yaml. The reviewed …
Out of Scope Changes check Passed The whole-PR diff against merge base 13a95c4 changes only .github/workflows/dart.yml, with +7/-2 lines. All changes are in the analyzer_compat Pin step. They consist of the zorphy_annotation path entr…
Full details: Title check

Explanation

The title names the change: it restores the zorphy_annotation path override in the analyzer_compat step of .github/workflows/dart.yml. The raw summary confirms both analyzer matrix branches now include that override, and the objectives describe the same fix for issue #164. The title is specific and matches the main change.

Full details: Linked Issues check

Explanation

Issue #164 requires the Pin analyzer step in the analyzer_compat job of .github/workflows/dart.yml to write the zorphy_annotation path override in both matrix branches, matching ci.yaml. The reviewed head adds zorphy_annotation: path: ../zorphy_annotation to the analyzer 14 printf (before analyzer, as the issue suggests) and to the analyzer 13 printf. The rest of each branch is unchanged. The issue's suggested fix is implemented as written, apart from an added explanatory comment. The only coding requirement is this workflow change, and the diff satisfies it. The PR's reported run results (pub get output, analyzer verification, 374 passing tests, build_runner output) are not independently re-run here. They do not affect this verdict, which rests on the code change. The issue's note about the forklift pool and PR process is administrative and not a coding requirement.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against merge base 13a95c4 changes only .github/workflows/dart.yml, with +7/-2 lines. All changes are in the analyzer_compat Pin step. They consist of the zorphy_annotation path entries in both branches and a comment explaining why the repetition is needed. The comment directly supports the fix and is in scope. No dependency, pubspec, test, or generated file changes are present.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b000583f-64e3-4280-830d-5da23e1b9dfb
Commits

Reviewing files that changed from the base of the PR and between 13a95c4 and aac07f8.

Files selected for processing: 1

  • .github/workflows/dart.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@arrrrny arrrrny added the chore maintenance — refactor, bump, migrate, docs, cleanup label Nov 16, 2026

@zuraffa-review zuraffa-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CodeRabbit review — PR #165 (commit aac07f8)

Verdict: No actionable issues. 🟢

The change is a one-step CI fix: both legs of analyzer_compat's Pin analyzer step in .github/workflows/dart.yml now repeat zorphy_annotation: path: ../zorphy_annotation, which the > redirection was silently dropping from the tracked zorphy/pubspec_overrides.yaml. The step is now byte-identical to the already-green ci.yaml equivalent.

Verification I ran (throwaway clone at aac07f8)

  • Reproduced the reported red: with only analyzer: ^13.0.0 in the override, dart pub get fails with Because zorphy depends on zorphy_annotation ^2.5.0 which doesn't match any versions (pub.dev's latest is 2.4.6).
  • Leg 13 (analyzer: ^13.0.0 + the path entry): resolves → analyzer 13.3.0, zorphy_annotation 2.5.0 from path ../zorphy_annotation; dart pub deps reports analyzer 13.3.0.
  • Leg 14 (adds the json_serializable git override): resolves → analyzer 14.7.0, json_serializable 7.0.0-wip from git, zorphy_annotation 2.5.0 from path; dart analyze lib → No issues found!.
  • Path resolution is right: the step runs with working-directory: zorphy, so ../zorphy_annotation is the in-repo package zorphy_annotation/, not a sibling checkout.
  • No collateral damage: zorphy/example carries its own pubspec_overrides.yaml (../../zorphy_annotation), so its dart pub get is unaffected; build-binaries.yml writes no override file, so it keeps using the tracked one, which still holds the path entry.
  • dart.yml parses as YAML, the extracted step body passes bash -n, and both rendered override files parse as valid YAML.

🔵 Optional (non-blocking)

See the inline comment: the > truncation is still fragile — any entry added to the tracked override file later gets dropped again in both legs. No action needed for this PR.

Walkthrough
  • dart.yml (push: master) had an analyzer_compat job whose pin step wrote only the analyzer pin; ci.yaml (pull_request) already wrote the path entry too. Master has been red on analyzer_compat (13)/(14) since 58f07bc while PR CI stayed green.
  • The fix mirrors ci.yaml in both legs and documents why the repetition is necessary, so the next reader does not "simplify" it back.
  • No dependency, version or test changes; no generated file touched.

Comment on lines +87 to +93
# `>` replaces the TRACKED zorphy/pubspec_overrides.yaml, so the
# zorphy_annotation path entry has to be repeated here (exactly as
# ci.yaml does): without it `dart pub get` resolves
# zorphy_annotation ^2.5.0 from pub.dev, where 2.5.0 is unpublished,
# and version solving fails (issue #164).
if [ "${{ matrix.analyzer }}" = "14" ]; then
printf 'dependency_overrides:\n analyzer: ^14.0.0\n json_serializable:\n git:\n url: https://github.com/google/json_serializable.dart\n path: json_serializable\n' > pubspec_overrides.yaml
printf 'dependency_overrides:\n zorphy_annotation:\n path: ../zorphy_annotation\n analyzer: ^14.0.0\n json_serializable:\n git:\n url: https://github.com/google/json_serializable.dart\n path: json_serializable\n' > pubspec_overrides.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Optional (non-blocking) — the > truncation is still fragile. Both legs rebuild zorphy/pubspec_overrides.yaml from scratch, so any entry added to the tracked file later (another path override, resolution:, workspace:) is silently dropped here again — the same failure mode as #164, just in the other direction, and with nothing in CI that would catch the drift between dart.yml and ci.yaml.

A drift-proof variant keeps the tracked file and appends the pin instead:

printf '  analyzer: ^%s.0.0\n' "${{ matrix.analyzer }}" >> pubspec_overrides.yaml
# the 14 leg additionally appends the json_serializable git block

That also removes the duplicated zorphy_annotation entry between the two legs. Fine to ship as-is — the comment above already documents the coupling.

@zuraffa-review

Copy link
Copy Markdown
Contributor

Walkthrough — analyzer_compat red on every master push (#164)

Symptom. .github/workflows/dart.yml (on: push: branches: [master]) has been red on analyzer_compat (13) and analyzer_compat (14) since 58f07bc6, both at Install dependencies: Because zorphy depends on zorphy_annotation ^2.5.0 which doesn't match any versions, version solving failed. Branch CI stayed green because .github/workflows/ci.yaml (pull_request) already carried the path entry in the same step.

Why. The pin step writes zorphy/pubspec_overrides.yaml with >, which truncates the tracked file. That file holds zorphy_annotation: path: ../zorphy_annotation, and zorphy/pubspec.yaml requires ^2.5.0 while pub.dev's newest release is 2.4.6 — so once the path entry is gone, the resolve has nowhere to go.

Fix. Repeat the zorphy_annotation path entry in both legs of dart.yml's pin step, exactly as ci.yaml does, plus a comment recording why the > truncation forces the repetition.

What I re-verified independently (throwaway clone at aac07f8, not the shared checkout):

check result
negative leg (analyzer pin only) reproduces the reported failure
leg 13 with the fix analyzer 13.3.0 + zorphy_annotation 2.5.0 from path ../zorphy_annotation
leg 14 with the fix analyzer 14.7.0, json_serializable 7.0.0-wip from git, zorphy_annotation 2.5.0 from path
dart analyze lib (leg 14) No issues found!
zorphy/example resolve unaffected — it has its own pubspec_overrides.yaml
YAML / shell sanity dart.yml parses; step body passes bash -n; both rendered override files parse

One 🔵 optional note (inline, non-blocking): the > still truncates the tracked file wholesale, so a future entry added there is dropped again in both legs — nothing in CI guards the dart.yml / ci.yaml parity. Appending the pin instead of replacing the file would remove that trap.

@arrrrny
arrrrny merged commit f682cde into master Nov 16, 2026
13 checks passed
@arrrrny

arrrrny commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Merge task

merged as f682cde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore maintenance — refactor, bump, migrate, docs, cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dart CI red on every master commit: analyzer_compat cannot resolve zorphy_annotation ^2.5.0

1 participant