-
Notifications
You must be signed in to change notification settings - Fork 88
fix(clobber registry): directory and file clobbering #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This is shaping up very nicely! Awesome work so far! Much clearer! |
bf1c6e3
to
5e95fb5
Compare
5e95fb5
to
5a93a81
Compare
This one should handle file vs directory conflicts as well as directory merging correctly most of the time. There are still several places where I think code can fail. And I think follow up should be, more rigorous, property-based testing for `path_trie` crate. Legends say that 2nd generation was lost somewhere in the sea of rebases.
5a93a81
to
e7320da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the structure and your approach! I left a few comments.
assert_yaml_snapshot!(prefix_record_clobber_2.files); | ||
assert_yaml_snapshot!(prefix_record_clobber_2.paths_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having multiple snapshots in a single test can be annoying because you run the test, get a snapshot change, update the snapshot and assume the test succeeds now. However, another snapshot might still fail. If possible I prefer to combine snapshots in a single snapshot to avoid this confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://insta.rs/docs/cli/#test. I don't think that it would be easy or actually useful to combine snapshots.
If you want to use nextest runner, then you can call cargo insta test --test-runner nextest --review
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont particularly agree that people should just change their workflow, but this is fine for me.
2413589
to
3cce4df
Compare
We change names to more intuitive as well as fix some PR comments along the way.
3cce4df
to
00f1325
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Description
Introduce new path conflict resolver that would allow to gracefully resolve path conflicts between file/directory in addition of previously handled file/file conflicts. See tests in
package_path_resolver.rs
in order to understand how it will resolve different types of conflict.Current state is draft since we don't do anything on-disk yet.