haskell-github-trust / ekg-core

Library for tracking system metrics
BSD 3-Clause "New" or "Revised" License
40 stars 39 forks source link

GHC 8.2.1 compilation error: Constructor ‘Stats.GCStats’ does not have the required strict field(s) #20

Closed YoEight closed 7 years ago

YoEight commented 7 years ago

Greetings.

I didn't see it on the issue dashboard so here's the error I got when building my library which has ekg-core as a dependency.

[9 of 9] Compiling System.Metrics   ( System/Metrics.hs, dist/build/System/Metrics.o )
System/Metrics.hs:449:16: error:
    • Constructor ‘Stats.GCStats’ does not have the required strict field(s): parBalancedBytesCopied
    • In the expression:
        Stats.GCStats
          {bytesAllocated = 0, numGcs = 0, maxBytesUsed = 0,
           numByteUsageSamples = 0, cumulativeBytesUsed = 0, bytesCopied = 0,
           currentBytesUsed = 0, currentBytesSlop = 0, maxBytesSlop = 0,
           peakMegabytesAllocated = 0, mutatorCpuSeconds = 0,
           mutatorWallSeconds = 0, gcCpuSeconds = 0, gcWallSeconds = 0,
           cpuSeconds = 0, wallSeconds = 0, parTotBytesCopied = 0,
           parMaxBytesCopied = 0, mblocksAllocated = 0}
      In an equation for ‘emptyGCStats’:
          emptyGCStats
            = Stats.GCStats
                {bytesAllocated = 0, numGcs = 0, maxBytesUsed = 0,
                 numByteUsageSamples = 0, cumulativeBytesUsed = 0, bytesCopied = 0,
                 currentBytesUsed = 0, currentBytesSlop = 0, maxBytesSlop = 0,
                 peakMegabytesAllocated = 0, mutatorCpuSeconds = 0,
                 mutatorWallSeconds = 0, gcCpuSeconds = 0, gcWallSeconds = 0,
                 cpuSeconds = 0, wallSeconds = 0, parTotBytesCopied = 0,
                 parMaxBytesCopied = 0, mblocksAllocated = 0}
    |
449 | emptyGCStats = Stats.GCStats
    |                ^^^^^^^^^^^^^...

Regards

23Skidoo commented 7 years ago

Latest Hackage release should work with GHC 8.2.1, see #18.

YoEight commented 7 years ago

I did a bad job as I forgot to mention it uses 0.1.1.2 which I believe is the last hackage version.

YoEight commented 7 years ago

Not a lot of information but you can find the build here => https://travis-ci.org/YoEight/eventstore/jobs/262834338

23Skidoo commented 7 years ago

Ah, you're using GHC HEAD (8.3.20170802), i.e. the future 8.4.1. Then this is a duplicate of #19.

YoEight commented 7 years ago

My bad, indeed it was my GHC HEAD build.