Use filer in sync command#424
Closed
pietern wants to merge 4 commits into
Closed
Conversation
This deprecates usage of the `repofiles` package in favor of the filer package and consolidates the code paths into WSFS. Note: one potentially breaking change here is the following. If a file at `foo/bar.txt` is created and removed, the directory `foo` is kept around because we do not perform directory tracking. If subsequently we need to write a file at `foo`, it will result in an `fs.ErrExist` because it is impossible to overwrite a directory. The previous implementation performed a recursive delete of the path if this happened, where this implementation will return the `fs.ErrExist` error to the user. We can mitigate this in one of two ways: * Track directories to remove as part of a `diff` and remove them * Attempt to remove an empty directory tree if we see this error * ...?
andrewnester
approved these changes
Jun 2, 2023
andrewnester
approved these changes
Jun 2, 2023
Contributor
Author
|
We can't merge this without #425. I incorporated the changes in this PR there. |
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.
Changes
This deprecates usage of the
repofilespackage in favor of the filer package and consolidates the code paths into WSFS.Note: one breaking change here is the following. If a file at
foo/bar.txtis created and removed, the directoryfoois kept around because we do not perform directory tracking. If subsequently, we need to write a file atfoo, it will result in anfs.ErrExistbecause it is impossible to overwrite a directory.The previous implementation performed a recursive delete of the path if this happened, where this implementation will return the
fs.ErrExisterror to the user.How to solve directory handling:
Tests
Existing integration tests pass.