Skip to content

Commit

Permalink
Delete obsolete proto3-suite patch (digital-asset#2601)
Browse files Browse the repository at this point in the history
* Delete obsolete proto3-suite patch

My patch has been upstreamed so no need to keep it around in our repo.

* Upgrade proto3-wire

* Adapt to changes in proto3-suite
  • Loading branch information
cocreature authored and mergify[bot] committed Aug 20, 2019
1 parent 2374b8c commit 0e777d9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 90 deletions.
8 changes: 3 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,12 @@ hazel_repositories(
# https://github.com/DACH-NY/daml/blob/master/ghc-lib/working-on-ghc-lib.md.
hazel_ghclibs(GHC_LIB_VERSION, "ce14e19bbe2a52289c5fb436941f948678a86bd821c17710082131bbe87d997f", "02482f4fd7691c2e442f9dd4c8d6816325d0bd164f6e03cec6a2db1ef9e65d43") +
hazel_github_external("digital-asset", "hlint", "c57edffa2bd54605637671f7821a2519d34c37bf", "9c81a0822af933dc13240d74218534308c7e5a2db80bad4a33c72890397275fd") +
hazel_github_external("awakesecurity", "proto3-wire", "43d8220dbc64ef7cc7681887741833a47b61070f", "1c3a7fbf4ab3308776675c6202583f9750de496757f3ad4815e81edd122d75e1") +
hazel_github_external("awakesecurity", "proto3-wire", "4f355bbac895d577d8a28f567ab4380f042ccc24", "b49bd371847b0cffe0673592870e221708d4ec238589c1739a6d3d03f570ed66") +
hazel_github_external(
"awakesecurity",
"proto3-suite",
"dd01df7a3f6d0f1ea36125a67ac3c16936b53da0",
"59ea7b876b14991347918eefefe24e7f0e064b5c2cc14574ac4ab5d6af6413ca",
patch_args = ["-p1"],
patches = ["@com_github_digital_asset_daml//bazel_tools:haskell-proto3-suite.patch"],
"f5ca2bee361d518de5c60b9d05d0f54c5d2f22af",
"878ecbda73c6b7ed924e55f8c4314af39303c6b19a30312f9a1b4d41db67ad1d",
) +

# Not in stackage
Expand Down
83 changes: 0 additions & 83 deletions bazel_tools/haskell-proto3-suite.patch

This file was deleted.

3 changes: 2 additions & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Archive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import qualified DA.Daml.LF.Proto3.Encode as Encode
import qualified Data.ByteArray as BA
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import Data.Int
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Numeric
import qualified Proto3.Suite as Proto

data ArchiveError
= ProtobufError !String
| UnknownHashFunction !Int
| UnknownHashFunction !Int32
| HashMismatch !T.Text !T.Text
deriving (Eq, Show)

Expand Down
3 changes: 2 additions & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ module DA.Daml.LF.Proto3.Error
) where

import qualified Data.Text as T
import Data.Int (Int32)
import Data.Word (Word64)

import DA.Daml.LF.Ast

data Error
= MissingField String
| UnknownEnum String Int
| UnknownEnum String Int32
| ParseError String
| DuplicateModule ModuleName
| DuplicateDataType TypeConName
Expand Down
4 changes: 4 additions & 0 deletions libs-haskell/da-hs-base/src/Orphans/Lib_pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
{-# OPTIONS_GHC -Wno-orphans #-}
module Orphans.Lib_pretty() where

import Data.Int
import qualified Data.Text as T
import Text.PrettyPrint.Annotated.HughesPJClass

instance Pretty T.Text where
pPrint = text . T.unpack

instance Pretty Int32 where
pPrint i = pPrint (fromIntegral i :: Int)

0 comments on commit 0e777d9

Please sign in to comment.