Skip to content

fix: share the publish dry-run gate with the FRB pin whitelist - #28

Merged
iota9star merged 2 commits into
mainfrom
fix/pub-dry-run-shared
Sep 30, 2026
Merged

iota9star merged 2 commits into
mainfrom
fix/pub-dry-run-shared

Conversation

@iota9star

Copy link
Copy Markdown
Member

Summary

The first v3.3.2 publish run failed in the publish job: publish-pub.yml runs its own flutter pub publish --dry-run, which trips pub tight-constraint warning for the deliberate exact flutter_rust_bridge pin — the same warning already whitelisted in the Darwin release preparation by #26.

This extracts the warning-tolerating dry-run check into tool/check_pub_dry_run.sh and uses it from both call sites:

  • tool/prepare_darwin_release.sh (Darwin CI leg)
  • .github/workflows/publish-pub.yml (tag publish)

The script tolerates exactly the one expected should allow more than one version warning for flutter_rust_bridge; any other warning, any Error output, or a failure without the expected warning is still fatal. The real publish continues to run flutter pub publish --force.

Also wires the new script into the cargokit hash inputs and the structure self-check invariants. Verified locally on a clean tree: the gate passes with the pin warning present, and the structure check accepts the new assertions.

The v3.3.2 publish failed because publish-pub.yml runs its own
flutter pub publish --dry-run, which trips pub's tight-constraint
warning for the deliberate exact flutter_rust_bridge pin. Extract
the warning-tolerating dry-run check into tool/check_pub_dry_run.sh
and use it from both the Darwin release preparation and the publish
workflow; wire it into the cargokit hash inputs and self-check.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 07:41

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The new script is not executable, and its warning matching can whitelist unrelated dependency warnings.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Centralizes the warning-aware pub publish dry-run gate for Darwin releases and tag publishing.

Changes:

  • Adds a shared dry-run validation script.
  • Uses it in release preparation and publishing CI.
  • Adds structure checks and cargokit hash tracking.
File Description
tool/​check_pub_dry_run.sh Implements the shared dry-run gate.
tool/​prepare_darwin_release.sh Calls the shared gate.
.github/​workflows/​publish-pub.yml Uses the gate before publishing.
tool/​check_darwin_package_support.sh Adds structural invariants.
libfjs/​cargokit.yaml Tracks the gate as a hash input.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tool/check_pub_dry_run.sh
@@ -0,0 +1,34 @@
#!/bin/sh
require_contains "tool/prepare_darwin_release.sh" "flutter pub publish --dry-run"
require_contains "tool/prepare_darwin_release.sh" "should allow more than one version"
require_contains "tool/prepare_darwin_release.sh" "check_pub_dry_run.sh"
require_contains "tool/check_pub_dry_run.sh" "flutter pub publish --dry-run"
Comment thread tool/check_pub_dry_run.sh

total_warnings="$(sed -nE 's/^Package has ([0-9]+) warnings?\.$/\1/p' "$log" | tail -n 1)"
[ -n "$total_warnings" ] || total_warnings=0
frb_pin_warnings="$(grep -c 'should allow more than one version' "$log" || true)"
@iota9star
iota9star merged commit 7e5a63a into main Sep 30, 2026
14 checks passed
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.

2 participants