killy971 / codecov-haskell Goto Github PK
View Code? Open in Web Editor NEWcodecov.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
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
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.
Environment variable reference: https://github.com/codecov/codecov-python/blob/8b9ec3989477c0276158f807a4643d431be288a8/codecov/__init__.py#L82-L148
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:
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.
Coverage when tested with takeUntil (> 1) [] ~=? []
:
Coverage when tested with takeUntil (> 1) [2] ~=? [2]
:
Coverage when tested with takeUntil (> 1) [1, 2] ~=? [1, 2]
:
See https://travis-ci.org/TokTok/hstox/builds/142282190#L705
The last line is: codecov-haskell: Maybe.fromJust: Nothing
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
In the current implementation, each http request is only tried once, with the connection and read timeouts each set to 1 minute.
When the http request fails, it is never retried and no result is returned.
This change will improve the resiliency by introducing a retry policy to each http call.
The https://github.com/Soostone/retry library will be used for the implementation.
Feature branch: retry-http-requests
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
Starting from Cabal 1.22 / GHC 7.10, the hpc data output directory seems to have changed.
Instead of dist/hpc/, the data files are now located under dist/hpc/vanilla/.
Therefore, using hpc-coveralls up to version 0.8.3 fails when it tries to read the tix/mix files.
See also killy971/hpc-coveralls#38
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.