Skip to content

Commit

Permalink
Ok now this makes sense
Browse files Browse the repository at this point in the history
  • Loading branch information
aewering committed Dec 17, 2023
1 parent 2f8b95f commit 298f1ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protoc-gen-elm",
"version": "3.3.3",
"version": "3.3.4",
"description": "Elm protoc plugin",
"keywords": [
"elm",
Expand Down
2 changes: 1 addition & 1 deletion src/Generator.elm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ convert versions options fileNames descriptors =
declarations =
removeDuplicateDeclarations
(List.concatMap (Enum.toAST options) struct.enums
++ List.concatMap (Message.toAST options moduleName) struct.messages
++ List.concatMap (Message.toAST options) struct.messages
++ List.concatMap (OneOf.toAST options) struct.oneOfs
)

Expand Down
6 changes: 3 additions & 3 deletions src/Generator/Message.elm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ reexportAST options internalsModule moduleName msg =
)


toAST : Options -> C.ModuleName -> Message -> List C.Declaration
toAST options moduleName msg =
toAST : Options -> Message -> List C.Declaration
toAST options msg =
let
type_ : C.Declaration
type_ =
Expand Down Expand Up @@ -160,7 +160,7 @@ toAST options moduleName msg =
else
C.varPattern "value"
]
(if moduleName == [ "Proto", "Google", "Protobuf" ] && msg.dataType == "Timestamp" then
(if msg.dataType == "Proto__Google__Protobuf__Timestamp" then
-- Use custom JSON encoder for timestamp
C.apply [ C.fqFun [ "Protobuf", "Utils", "Timestamp" ] "timestampJsonEncoder", C.val "value" ]

Expand Down

0 comments on commit 298f1ea

Please sign in to comment.