Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when resolving merge or rebase conflicts in flutter_rust_bridge, especially conflicts involving generated files after master/main changed independently from a PR branch.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -21% | 0% |
Use this skill before resolving merge or rebase conflicts in flutter_rust_bridge.
Resolve hand-written files semantically. Do not hand-resolve generated files as the final result.
Generated conflict output should be treated as a stale artifact from two independently valid histories. After the hand-written sources are merged, regenerate the generated outputs and commit that regenerated result.
frb-code-generation to choose the minimal regeneration command.frb-fix-ci before deeper investigation.List unmerged files:
bashgit diff --name-only --diff-filter=U
Classify each file into one of these buckets:
| Bucket | Examples | Resolution | |--------|----------|------------| | Hand-written source | Rust APIs, codegen logic, Dart tests, docs, configs | Resolve manually with normal semantic merge | | Generated output | frb_generated.*, *.freezed.dart, *.g.dart, generated API wrappers, generated test entrypoints | Pick one side only as a temporary placeholder, then regenerate | | Ambiguous generated-like output | lockfiles, copied template outputs, integrate scaffolds | Confirm source of truth before choosing; use frb-fix-ci dependency graph if unsure |
Do not use the generated-file shortcut for hand-written files merely because they are noisy.
When a generated file conflicts because both base and PR independently added tests or APIs:
The chosen side is not the final answer; it only clears conflict markers so the generator can run.
frb-code-generation.For broad PR-vs-master generated drift, prefer:
bash./frb_internal precommit-generate
For frb_example/pure_dart and frb_example/pure_dart_pde conflicts, the internal generator and package codegen cover different outputs. If the merge touches generated test entrypoints, copied PDE files, or the pure-Dart chain, run:
bash./frb_internal generate-internal-frb-example-pure-dart
If the merge also brings in hand-written Rust or Dart API changes, run package codegen after the internal generator:
bash./frb_internal generate-run-frb-codegen-command-generate --package frb_example/pure_dart ./frb_internal generate-run-frb-codegen-command-generate --package frb_example/pure_dart_pde
Do not stop after the internal generator when CI errors mention missing methods on generated Dart APIs such as RustLibApi; that usually means the package frb_generated.* files are stale.
For a normal git merge master into a PR branch, this is usually enough for generated paths:
bashgit checkout --ours -- <generated-path> git add <generated-path>
For a git rebase, remember Git reverses the intuitive meaning of ours/theirs: --ours is the branch being rebased onto, and --theirs is the replayed commit. Since generated files are only placeholders, either side can be acceptable if the file still exists and regeneration will overwrite it. When deletion/addition is involved, prefer the side that leaves the path in the shape expected by the generator, then verify after regeneration.
After regeneration:
bashgit diff --check git diff --name-only --diff-filter=U git status --short
Then run the relevant local Docker-backed checks from the project skills. For broad generated-file conflict repairs, start with the same generation command CI would run, then use CI to validate the full matrix.
If CI later reports more generated diff, add the experience back to this skill so the next repair has a sharper rule.
Keep the conflict-resolution commit focused:
Other measured skills in the registry, with their headline benchmark lift.