Repository navigation
fix: share the publish dry-run gate with the FRB pin whitelist - #28
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
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
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.
| @@ -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" |
|
|
||
| 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)" |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
The first v3.3.2 publish run failed in the
publishjob:publish-pub.ymlruns its ownflutter pub publish --dry-run, which trips pub tight-constraint warning for the deliberate exactflutter_rust_bridgepin — 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.shand 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 versionwarning forflutter_rust_bridge; any other warning, anyErroroutput, or a failure without the expected warning is still fatal. The real publish continues to runflutter 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.