Repository navigation
feat(file): move takes any kind; move_directory retires - #636
Merged
Merged
Conversation
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.
Phase 4 of any-entry-claims.md. Closes #620. Feature: #616.
A symbolic link can be moved again — the capability that regressed when kind-honest activation landed
(#611), and the reason this feature exists.
file.move(source, destination_path)takes the taxonomy interface, so an authored path claims asfile.Anyand resolves to whatever the disk holds. The two typed fronts and the sharedmoveEntrycorecollapse into one method;
file.move_directoryis removed; writ migrate's layer registration reverts toplain
file.move;Backupdelegates without a policy argument.on_missingis gone frommove. Moving something that is gone accomplishes nothing, and a toleratedmiss returned a nil product — handing downstream consumers a nil promise, the pathology that had
Skipdropped from
MissingResourcePolicy(#605). The claim is required, so the verdict lands at pre-flight.Two findings the acceptance scenarios earned
The collision arrived early, in immediate mode.
file.copyinterns a product as*Regular; a laterfile.moveon the same rel mints anAnyclaim, andinternEntry's type assertion refused it. Theruled semantics were never in doubt — one identity, the kinded entry keeps the slot — but a constructor
promising
*Anywould have to fail in exactly the case the rule says should succeed. SoDiscoverAnyreturns the taxonomy interface, the one constructor that does and deliberately. The generator learned a
matching, narrow fallback: every constructor in the tree returns
*T, so a non-pointer return is theinterface case, and the announced type comes from the constructor's name (
Discover<T>) — a conventionevery provider already follows.
file.Anywas not enrolled in pre-flight's staged verification gate, so its claims were skippedentirely and a missing source was rediscovered mid-run by the mover's own I/O rather than failing at the
starting line. Caught by the missing-source scenario, which is exactly what an acceptance pin is for.
Also: immediate mode needed the designation too — it bypasses the planner and converts directly, so
Convert's registered-construction step consults the same registry. One designation, both seams.Scenarios
test_judgment_move_any_kind.starmoves all three kinds in one graph, with the sharp assertion on thelink: the link moves, its target does not — a follow would be unmistakable, since the target would
vanish from its original path.
test_judgment_move_missing_source.starpins the verdict's location —the catalog's "verify existence" at pre-flight, not a rename failure at dispatch.
Gate:
make test103 ok / 0 fail;make vetclean under darwin, windows, and linux;gofmt -lclean.