You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ci): keep zorphy_annotation path override in dart.yml analyzer_compat - #165
.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:
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.
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
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.
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: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
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
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
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.
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.
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.
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.
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.
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.
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
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.
Root cause
.github/workflows/dart.yml(thepush-triggered workflow) has ananalyzer_compatjob whosePin analyzer ${{ matrix.analyzer }}.xstep writeszorphy/pubspec_overrides.yamlwith>— truncating the tracked file:Both legs of the pin step then wrote only the analyzer pin, so the path entry
was gone by the time
dart pub getran.zorphy/pubspec.yamldeclareszorphy_annotation: ^2.5.0, and 2.5.0 is not published (pub.dev latest is2.4.6), so the resolve fell through to pub.dev and failed:
.github/workflows/ci.yaml(thepull_requestgate) already carriedzorphy_annotation: path: ../zorphy_annotationin both legs of the same step —which is exactly why branch CI was green while every master commit since
58f07bc6was red onanalyzer_compat (13)/analyzer_compat (14). Theanalyze_and_testjob stayed green because it never overwrites the file.Fix
One step, mirroring
ci.yaml: thezorphy_annotationpath entry is repeatedin 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: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:
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/OKdart 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/OKdart 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!bash -non the rendered script: OK) anddart.ymlparses as YAML.Closes #164
Summary by CodeRabbit