Repository navigation
Keep symbolic links and permissions when the editor saves - #329
Merged
Merged
Conversation
The atomic save (#297) renamed a temporary file over the target, which replaces the directory entry: a symbolic link became a plain file and the shared schema it named kept the old content, and the saved file took the process's default mode. The save now follows the path to the file it finally names and replaces that, and copies the existing file's Unix mode onto the temporary file first. Fixes #324 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9FBXHS37WoAF87LDY2ZVV
Refusing unknown options (#310) and the --no-data flag landed separately, and validate's list of known options was left empty, so 'validate --no-data' exited 1 with the usage text and TestValidateSkipsDataFilesWhenAskedTo fails on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9FBXHS37WoAF87LDY2ZVV
Contributor
Author
|
The failing test here was Generated by Claude Code |
|
4 tasks
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.



Requested by Matt · project thread
Fixes #324.
The atomic save from #297 writes a temporary file and renames it over the target. A rename replaces a directory entry rather than a file, which caused two regressions:
Changes in
SchemaFile.WriteAtomically:File.Replace.Two tests in
SchemaFileTestscover this, and I ran both against main first to confirm they fail there:SavingThroughASymbolicLinkUpdatesTheFileItNameschecks that the link is still a link and the file it names has the new content. It is skipped as inconclusive where links can't be created, such as on Windows without the privilege.SavingOverAFileKeepsItsPermissionschecks that a group-writable mode is kept. It is skipped on Windows.I ran
Schema.Editor.Testlocally and all 33 tests pass. The container only has SDK 10.0.1xx, so for that local run I temporarily changedglobal.jsonand overrode the compiler. Neither change is committed.Generated by Claude Code