Skip to content

Commit

Permalink
Update proto3-wire commit and fix merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
j6carey committed Nov 18, 2024
1 parent 84f134a commit 7c1c679
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions nix/overlays/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ in {
source = pkgsNew.fetchFromGitHub {
owner = "awakesecurity";
repo = "proto3-wire";
rev = "6fcef0427abf4f02ec28fd041bd27c647234655b"; # 1.4.4
sha256 = "5IoaqARYdrxkmk0r0Z0J/OaVKIH1ehyWKllCrHVvslc=";
rev = "40a907da45cf3946d91ac34799749b6e92cc86d2"; # 1.4.4
sha256 = "8LgeDChLOpcLiBX/tRBmhan2o/TWBSdompfPoqBI7NQ=";
};
in
pkgsNew.haskell.lib.doJailbreak
Expand Down
10 changes: 6 additions & 4 deletions proto3-suite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,24 @@ test-suite tests
autogen-modules:
TestProto
TestProtoImport
TestProtoNegativeEnum
TestProtoNestedMessage
TestProtoOneof
TestProtoOneofImport
TestProtoWrappers
TestProtoNestedMessage

other-modules:
ArbitraryGeneratedTestTypes
TestCodeGen
TestProto
TestProtoImport
TestProtoOneof
TestProtoOneofImport
TestProtoWrappers
--TestProtoLeadingDot
TestProtoNegativeEnum
TestProtoNestedMessage
TestProtoOneof
TestProtoOneofImport
--TestProtoProtocPlugin
TestProtoWrappers
Test.Proto.Generate.Name
Test.Proto.Generate.Name.Gen
Test.Proto.Parse
Expand Down
2 changes: 1 addition & 1 deletion tests/SimpleEncodeDotProto.hs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ testCase_BytesValue = do
emit (Just "") [] (Just "789")
emit (Just "012") ["", "", ""] (Just "")

testCase_NegativeEnum :: (?format :: Format) => IO ()
testCase_NegativeEnum :: (?format :: Format, ?iterator :: Iterator) => IO ()
testCase_NegativeEnum = do
let emit = outputMessage . TestProtoNegativeEnum.WithNegativeEnum . Enumerated . Right
emit TestProtoNegativeEnum.NegativeEnumNEGATIVE_ENUM_0
Expand Down
6 changes: 6 additions & 0 deletions tests/Test/Proto/ToEncoder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import qualified Proto3.Suite.Form.Encode as FormE

import TestProto
import qualified TestProtoImport
import qualified TestProtoNegativeEnum
import qualified TestProtoOneof
import qualified TestProtoOneofImport
import qualified TestProtoWrappers
Expand Down Expand Up @@ -421,4 +422,9 @@ instance ToEncoder MapTest
FormE.field @"key" k .
FormE.field @"value" v

instance ToEncoder TestProtoNegativeEnum.WithNegativeEnum
where
toEncoder (TestProtoNegativeEnum.WithNegativeEnum f1) = FormE.fieldsToMessage $
FormE.field @"v" f1

#endif
2 changes: 1 addition & 1 deletion tests/decode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ ghc \
"$@" \
$hsTmpDir/TestProto.hs \
$hsTmpDir/TestProtoImport.hs \
$hsTmpDir/TestProtoNegativeEnum.hs \
$hsTmpDir/TestProtoOneof.hs \
$hsTmpDir/TestProtoOneofImport.hs \
$hsTmpDir/TestProtoWrappers.hs \
$hsTmpDir/TestProtoNegativeEnum.hs \
tests/Test/Dhall/Orphan.hs \
tests/SimpleDecodeDotProto.hs \
>/dev/null
Expand Down
2 changes: 1 addition & 1 deletion tests/encode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ ghc \
"$@" \
$hsTmpDir/TestProto.hs \
$hsTmpDir/TestProtoImport.hs \
$hsTmpDir/TestProtoNegativeEnum.hs \
$hsTmpDir/TestProtoOneof.hs \
$hsTmpDir/TestProtoOneofImport.hs \
$hsTmpDir/TestProtoWrappers.hs \
$hsTmpDir/TestProtoNegativeEnum.hs \
tests/Test/Dhall/Orphan.hs \
tests/Test/Proto/ToEncoder.hs \
tests/SimpleEncodeDotProto.hs \
Expand Down

0 comments on commit 7c1c679

Please sign in to comment.