diff --git a/infra/Pos/Infra/Reporting/Http.hs b/infra/Pos/Infra/Reporting/Http.hs index 76b0a84c1c6..d5e6328458e 100644 --- a/infra/Pos/Infra/Reporting/Http.hs +++ b/infra/Pos/Infra/Reporting/Http.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE AllowAmbiguousTypes #-} - module Pos.Infra.Reporting.Http ( sendReport , sendReportNodeImpl @@ -13,11 +11,13 @@ import Control.Exception.Safe (catchAny, try) import Data.Aeson (encode) import qualified Data.List.NonEmpty as NE import Data.Time.Clock (getCurrentTime) +import Data.Version (showVersion) import Formatting (sformat, shown, string, (%)) import Network.HTTP.Client (httpLbs, newManager, parseUrlThrow) import qualified Network.HTTP.Client.MultipartFormData as Form import Network.HTTP.Client.TLS (tlsManagerSettings) -import Pos.ReportServer.Report (ReportInfo (..), ReportType (..)) +import Pos.ReportServer.Report (BackendVersion (..), ReportInfo (..), ReportType (..), + Version (..)) import System.FilePath (takeFileName) import System.Info (arch, os) @@ -26,7 +26,7 @@ import Pos.Crypto (ProtocolMagic (..)) import Pos.Infra.Reporting.Exceptions (ReportingError (..)) import Pos.Infra.Reporting.MemState () import Pos.Util.CompileInfo (CompileTimeInfo) -import Pos.Util.Trace (Trace, Severity (..), traceWith) +import Pos.Util.Trace (Severity (..), Trace, traceWith) import Pos.Util.Util (()) @@ -69,7 +69,7 @@ sendReport pm compileInfo mLogFile reportType appName reportServerUri = do -- We are using version of 'cardano-sl-infra' here. We agreed -- that the version of 'cardano-sl' and it subpackages should -- be same. - , rVersion = version + , rVersion = BackendVersion . Version . fromString . showVersion $ version , rBuild = pretty compileInfo , rOS = toText (os <> "-" <> arch) , rMagic = getProtocolMagic pm