Giter Site home page Giter Site logo

killy971 / codecov-haskell Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 16.0 50 KB

codecov.io support for haskell code coverage with hpc

Home Page: http://hackage.haskell.org/package/codecov-haskell

License: BSD 3-Clause "New" or "Revised" License

Haskell 100.00%

codecov-haskell's Issues

Failed to install codecov-haskell

Hi, I recently tried codecov-haskell and it seems that it fails to install. Here is the log:

 While building package codecov-haskell-0.5.0 using:
      /home/travis/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/travis/build/ardeleanasm/qchas/.stack-work/logs/codecov-haskell-0.5.0.log
    Configuring codecov-haskell-0.5.0...
    Building codecov-haskell-0.5.0...
    Preprocessing library codecov-haskell-0.5.0...
    [1 of 9] Compiling Trace.Hpc.Codecov.Util ( src/Trace/Hpc/Codecov/Util.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Trace/Hpc/Codecov/Util.o )
    [2 of 9] Compiling Trace.Hpc.Codecov.Types ( src/Trace/Hpc/Codecov/Types.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Trace/Hpc/Codecov/Types.o )
    [3 of 9] Compiling Trace.Hpc.Codecov.Lix ( src/Trace/Hpc/Codecov/Lix.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Trace/Hpc/Codecov/Lix.o )
    [4 of 9] Compiling Trace.Hpc.Codecov.Curl ( src/Trace/Hpc/Codecov/Curl.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Trace/Hpc/Codecov/Curl.o )
    
    /tmp/stack4708/codecov-haskell-0.5.0/src/Trace/Hpc/Codecov/Curl.hs:52:56: error:
        • Variable not in scope:
            (<>) :: RetryPolicyM m1 -> RetryPolicyM m0 -> RetryPolicyM m
        • Perhaps you meant one of these:
            ‘<$>’ (imported from Control.Applicative),
            ‘*>’ (imported from Control.Applicative),
            ‘<$’ (imported from Control.Applicative)
    
    /tmp/stack4708/codecov-haskell-0.5.0/src/Trace/Hpc/Codecov/Curl.hs:55:20: error:
        • Couldn't match type ‘IO (Maybe a)’
                         with ‘RetryStatus -> IO (Maybe a)’
          Expected type: IO (Maybe a) -> IO (Maybe a)
            Actual type: (RetryStatus -> IO (Maybe a)) -> IO (Maybe a)
        • In the expression: retrying expRetryPolicy isNothingM
          In an equation for ‘performWithRetry’:
              performWithRetry
                = retrying expRetryPolicy isNothingM
                where
                    isNothingM _ = return . isNothing
        • Relevant bindings include
            performWithRetry :: IO (Maybe a) -> IO (Maybe a)
              (bound at src/Trace/Hpc/Codecov/Curl.hs:55:1)

GHC Version: 8.0.2

Sending more env variables

I'll edit this message soon and elaborate, just needed to get it posted for the moment

Couple of env variables missing - here is a list of one's we are currently accepting per ci company: env variables ex

Thanks

Send expression level coverage report

Work branch: https://github.com/guillaume-nargeot/codecov-haskell/tree/expression-level-coverage

Some initial changes were made in a420f6f and 2c8ca35 to propagate additional information required to compute expression level coverage.

The remaining work consist in performing the following transformations:

  • split coverage entries which cover multiple lines into ones that cover only a single line
    • in the case of TopLevelEntry, discard all but the first line in case it is hit at least once
    • splitted lines will have their start column adjusted to the first non-blank character of the covered code
  • "unnest" coverage entries (see this gist for details)

Below are examples html outputs produced by hpc, which is what codecov-haskell should try to reproduce.
These html reports were generated for the same peace of code, with differing variations of coverage.

No coverage at all:
screen shot 2015-01-24 at 10 12 59 am

Coverage when tested with takeUntil (> 1) [] ~=? []:
screen shot 2015-01-24 at 10 13 28 am

Coverage when tested with takeUntil (> 1) [2] ~=? [2]:
screen shot 2015-01-24 at 10 13 42 am

Coverage when tested with takeUntil (> 1) [1, 2] ~=? [1, 2]:
screen shot 2015-01-24 at 10 13 55 am

Fix coverage result response reading

The following change was introduced on codecov server side, apparently by codecov/codecov-python@2eab8f9: instead of containing the total coverage result as a value, the response to codecov initial post request now contains a url (wait_url element in the json content).
Reading this url should return the coverage result in json format as in the example below:

{"coverage": 42}

Here is the code showing how codecov-python implements the functionality to wait and read the total coverage result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.