-
Notifications
You must be signed in to change notification settings - Fork 584
Native Builder: DiffKey and Differ Procol #482
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
Conversation
b16a605 to
298f486
Compare
Tests/NativeBuilderTests/ContainerBuildSnapshotterTests/BinaryPathTests.swift
Outdated
Show resolved
Hide resolved
298f486 to
6c06d63
Compare
6c06d63 to
08c93bd
Compare
| // Alternative test: ensure original path with valid UTF-8 round-trips correctly | ||
| let utf8Path = BinaryPath(string: "/usr/local/bin") | ||
| let utf8Data = try encoder.encode(utf8Path) | ||
| let utf8Decoded = try decoder.decode(BinaryPath.self, from: utf8Data) | ||
| #expect(utf8Path == utf8Decoded) |
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 think this is covered already in CodableWithValidUTF8
| @Test func PathWithMultipleSlashes() { | ||
| let path = BinaryPath(string: "//usr///local//bin//") | ||
| let components = path.components | ||
| #expect(components.count == 3) | ||
| #expect(components[0].stringValue == "usr") | ||
| #expect(components[1].stringValue == "local") | ||
| #expect(components[2].stringValue == "bin") | ||
| } |
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 think this is already covered in PathComponents
katiewasnothere
left a comment
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.
A couple minor comments on the tests, otherwise LGTM
This PR introduces the
Differwith methods:It also introduces
DiffKey, which is a MerkeTree based key for fast diff computations between two dirs