feat: drop apply --dry-run in favour of the diff verb#13
Merged
Conversation
BREAKING (pre-1.0, no alias): the `apply --dry-run` flag is removed. `ferry diff` is the read-only preview — it already shares apply's buildPlan/printPlan, so the output is identical. The field ships a preview as EITHER a diff verb OR a --dry-run flag, never both; ferry keeps the verb. Comments that advertised apply --dry-run as a preview path now point at diff; the CLI reference is regenerated. Recorded under the CHANGELOG Breaking section.
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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.
What
BREAKING (pre-1.0, no deprecation alias): removes the
apply --dry-runflag.ferry diffis now the single read-only preview.diffalready shares apply'sbuildPlan/printPlan, so its output is identicalto the old
--dry-run. The field ships "what would apply change" as EITHER adiffverb OR a--dry-run/-nflag — never both (git and chezmoi keep theverb); ferry keeps the verb.
Changes
cmd/commands.go: removed the--dry-runflag registration.cmd/apply.go: removed thedryRunread and theif dryRun { … }previewbranch in
runApply(it now goes straight to the mutating path);buildPlan/printPlanuntouched. Reworded comments that namedapply --dry-run.cmd/context.go,evals/terminal_test.go: comment rewordings only.evals/commands_test.go: replaced the optional dry-run probe with a positiveregression test —
apply --dry-runnow errors with an unknown flag, the targetstays unwritten, and
ferry diffstill previews write-free.evals/terminal_config_test.go: the executedapply --dry-runbecomesferry diff.Breakingentry.Verified
make build,gofmt -l .(empty),go vet ./...,go test ./..., and the fulleval suite all green. Behaviourally:
ferry apply --dry-run→unknown flag: --dry-run(exit 1);ferry diffpreviews normally.