packages feed

rattletrap 6.3.0 → 6.3.1

raw patch · 4 files changed

+13/−22 lines, 4 filesdep −clockPVP ok

version bump matches the API change (PVP)

Dependencies removed: clock

API changes (from Hackage documentation)

Files

package.yaml view
@@ -1,5 +1,5 @@ name: rattletrap-version: 6.3.0+version: 6.3.1  category: Game description: Rattletrap parses and generates Rocket League replays.@@ -60,7 +60,6 @@ tests:   test:     dependencies:-      clock: '>= 0.7.2 && < 0.8'       HUnit: '>= 1.6.0 && < 1.7'       rattletrap: -any       temporary: '>= 1.2.1 && < 1.4'
rattletrap.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 4951bb4cb7d0a5c9783e731db2936ee1173fc07512a57e616111bd6ec327e2ea+-- hash: 2606d1789b9e319765a5fc179c33f8d5445634713c67a75fb920906db82f226a  name:           rattletrap-version:        6.3.0+version:        6.3.1 synopsis:       Parse and generate Rocket League replays. description:    Rattletrap parses and generates Rocket League replays. category:       Game@@ -328,7 +328,6 @@     , binary >=0.8.5 && <0.9     , binary-bits >=0.5 && <0.6     , bytestring >=0.10.8 && <0.11-    , clock >=0.7.2 && <0.8     , containers >=0.5.10 && <0.7     , filepath >=1.4.1 && <1.5     , http-client >=0.5.10 && <0.7
stack.yaml view
@@ -1,9 +1,1 @@-resolver: lts-13.0--# The LTS 13.0 resolver uses the GHC 8.6.3 compiler. Unfortunately GHC 8.6.3-# has a bug on Windows that prevents Template Haskell splices from running.-# This package uses TH splices extensively and needs to build on Windows, so-# that's a problem. Fortunately Using the same resolver with an older compiler-# fixes the problem. Once either GHC 8.6.4 or 8.8.1 are released this project-# can go back to using the compiler provided by the resolver.-compiler: ghc-8.6.2 # https://github.com/tfausak/rattletrap/issues/108+resolver: lts-13.20
tests/Main.hs view
@@ -6,8 +6,9 @@ import qualified Control.Monad as Monad import qualified Data.ByteString.Lazy as Bytes import qualified Data.Int as Int+import qualified Data.Word as Word+import qualified GHC.Clock as Clock import qualified Rattletrap.Console.Main as Rattletrap-import qualified System.Clock as Clock import qualified System.Exit as Exit import qualified System.FilePath as Path import qualified System.IO.Temp as Temp@@ -47,17 +48,17 @@   do     (((), allocated), elapsed) <- withElapsed       (withAllocations (decode inputFile jsonFile))-    put "decoding" (Bytes.length input) (Clock.toNanoSecs elapsed) allocated+    put "decoding" (Bytes.length input) elapsed allocated   do     (((), allocated), elapsed) <- withElapsed       (withAllocations (encode jsonFile outputFile))-    put "encoding" (Bytes.length input) (Clock.toNanoSecs elapsed) allocated+    put "encoding" (Bytes.length input) elapsed allocated   output <- Bytes.readFile outputFile   Monad.unless     (output == input)     (Test.assertFailure "output does not match input") -put :: String -> Int.Int64 -> Integer -> Int.Int64 -> IO ()+put :: String -> Int.Int64 -> Word.Word64 -> Int.Int64 -> IO () put label size elapsed allocated = Printf.printf   "%s %d byte%s took %d nanosecond%s (%.3f MB/s) and allocated %d byte%s (%d x)\n"   label@@ -85,12 +86,12 @@   after <- Mem.getAllocationCounter   pure (result, before - after) -withElapsed :: IO a -> IO (a, Clock.TimeSpec)+withElapsed :: IO a -> IO (a, Word.Word64) withElapsed action = do-  before <- Clock.getTime Clock.Monotonic+  before <- Clock.getMonotonicTimeNSec   result <- action-  after <- Clock.getTime Clock.Monotonic-  pure (result, Clock.diffTimeSpec before after)+  after <- Clock.getMonotonicTimeNSec+  pure (result, after - before)  replays :: [(String, String)] replays =