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 warnings #19

Closed 23Skidoo closed 6 years ago

23Skidoo commented 7 years ago

The GHC.Stats module seems to have been refactored in GHC 8.2.1, so we now get a bunch of warnings of the following type when compiling System.Metrics:

System/Metrics.hs:414:55: warning: [-Wdeprecations]
    In the use of ‘bytesAllocated’ (imported from GHC.Stats):
    Deprecated: "Use RTSStats instead.  This will be removed in GHC 8.4.1"
    |
414 |      [ ("rts.gc.bytes_allocated"          , Counter . Stats.bytesAllocated)
    |                                                       ^^^^^^^^^^^^^^^^^^^^

See this gist for the full log. Looks like we'll have to write a compatibility shim to support future GHC versions.

23Skidoo commented 7 years ago

So basically base-4.10 deprecated GCStats in favour of RTSStats, which was introduced in base-4.9.

RyanGlScott commented 7 years ago

Yep, this can be a bit of a bear to migrate to. There are examples of this migration in accelerate and criterion.

lucasdicioccio commented 6 years ago

Is anyone taking this issue? By itself changing the RTS metrics seems OK-ish. The hard bit will be to arrange the code to work with old GHCs as well (there already are a few #ifdef around this code).

How much backward support do we want for ekg-core (I'd ask for ekg in general)?

23Skidoo commented 6 years ago

I'm not aware of anyone working on this right now, so you're welcome to.

How much backward support do we want for ekg-core (I'd ask for ekg in general)?

Supporting the GHC versions released during the last three years is a good rule of thumb. This means that we can drop 7.6 and 7.8.