Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ jobs:
# pubspec_overrides.yaml only supports `dependency_overrides`,
# `resolution` and `workspace` keys — the pin must be nested under
# `dependency_overrides:`, not written at the top level.
# `>` 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
Comment on lines +87 to +93

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.

else
printf 'dependency_overrides:\n analyzer: ^13.0.0\n' > pubspec_overrides.yaml
printf 'dependency_overrides:\n zorphy_annotation:\n path: ../zorphy_annotation\n analyzer: ^13.0.0\n' > pubspec_overrides.yaml
fi
cat pubspec_overrides.yaml

Expand Down
Loading