Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c889293
Add applying and tests
pouyayarandi Nov 25, 2023
f01f29c
Move extension to another file
Nov 27, 2023
eaa0666
Some minor changes in comments
Nov 27, 2023
9e33a9b
Revert "Some minor changes in comments"
Dec 1, 2023
b728a33
Revert "Move extension to another file"
Dec 1, 2023
634ca09
Revert "Add applying and tests"
Dec 1, 2023
ad59804
Implement field mask utils
Dec 3, 2023
1b5fbe9
Update cmakelist
Dec 3, 2023
c1e42b2
Add comments for path decoding error
Dec 3, 2023
da24d19
Change APIs
Dec 8, 2023
1c94065
Add comments
Dec 8, 2023
af441d1
Remove copy mechanism in some functions
Dec 13, 2023
249b066
Change path contain and canonical algorithm
Dec 13, 2023
795b22a
Rename field mask error
Dec 13, 2023
095dde2
Fix intersect and subtract
Dec 13, 2023
37f1872
Implement merge option
Dec 13, 2023
08270b5
Add comments
Dec 13, 2023
d657a81
Fix bug of extra paths
pouyayarandi Dec 14, 2023
3269433
Fix comment
pouyayarandi Dec 14, 2023
d564895
Change if to guard
pouyayarandi Dec 15, 2023
fcec7f2
Fix comments
Dec 22, 2023
787957f
Fix variable names with underscore
Dec 22, 2023
eedb785
Fix comments
Jan 17, 2024
d7ba532
Fix comments
Feb 2, 2024
03f5f0d
Fix build errors in swift 5.8 and later using any keyword for type-ca…
Mar 29, 2024
9e15359
Add a test for trim with extensible messages
Mar 29, 2024
dcfa442
Rename merge(from:) to merge(with:)
Apr 13, 2024
aae790b
Replace GetPathDecoder with PathVisitor
May 3, 2024
db6be11
Improve tests
May 4, 2024
1ef69c9
Fix comments
May 15, 2024
35163e1
Fix failing test
May 16, 2024
702679b
Fix issue of json path names
May 16, 2024
e3d01ea
Fix comments
Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Sources/SwiftProtobuf/PathDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ extension Message {
guard let type = Self.self as? any _ProtoNameProviding.Type else {
return nil
}
return type._protobuf_nameMap.number(forJSONName: field)
return Array(field.utf8).withUnsafeBytes { bytes in
type._protobuf_nameMap.number(forProtoName: bytes)
}
}

static func name(for field: Int) -> String? {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftProtobufTests/Test_FieldMask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ final class Test_FieldMask: XCTestCase, PBTestHelpers {
var message = SwiftProtoTesting_Fuzz_Message()
message.singularInt32 = 1
message.SwiftProtoTesting_Fuzz_singularInt32Ext = 1
let mask = Google_Protobuf_FieldMask(protoPaths: ["singularString"])
let mask = Google_Protobuf_FieldMask(protoPaths: ["singular_string"])

// Checks trim should retain extensions while removes other fields.
let r1 = message.trim(fieldMask: mask)
Expand Down