Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'hpc-coveralls': command not found #48

Closed
mrkkrp opened this issue Aug 2, 2015 · 13 comments
Closed

'hpc-coveralls': command not found #48

mrkkrp opened this issue Aug 2, 2015 · 13 comments
Assignees
Labels

Comments

@mrkkrp
Copy link

mrkkrp commented Aug 2, 2015

Hello, thank you for this project. I've modified .travis.yml file according to instructions given in readme file: mrkkrp/megaparsec@05c92cb

However, the command hpc-coveralls is not available, although package hpc-coveralls seems to be installed successfully: https://travis-ci.org/mrkkrp/megaparsec/jobs/73749896#L692

Can you tell what may be wrong and how to fix it?

@mrkkrp
Copy link
Author

mrkkrp commented Aug 3, 2015

OK, I've exported PATH so it can find it: https://travis-ci.org/mrkkrp/megaparsec/jobs/73844122#L693

But as you can see it doesn't work this way as well... I've read several .travis.yml files of various projects that "work", but I cannot find any difference.

@mrkkrp
Copy link
Author

mrkkrp commented Aug 3, 2015

Some comment would be much appreciated.

@killy971
Copy link
Owner

killy971 commented Aug 3, 2015

Sorry for the delay in my response.
I'm going to investigate as soon as I can.

@killy971
Copy link
Owner

killy971 commented Aug 3, 2015

I had a quick look at the build log of your project on Travis CI, and it looks like the problem is not about finding the hpc-coveralls executable, but rather the .mix files.
From what I see, it is very likely to be the same problem as the one tracked by the issue #44, which should soon be fixed.

@mrkkrp
Copy link
Author

mrkkrp commented Aug 3, 2015

@guillaume-nargeot, thank you for your response. Please note that I had to export new value of PATH, without it Travis cannot find hpc-coveralls anyway. If you think it's OK, please add instructions to your README.md file so people know that they need to export PATH manually. However, other projects don't seem to need to do this, so I wonder if this is just a manifestation of another problem in my case.

@killy971
Copy link
Owner

killy971 commented Aug 4, 2015

Thank you for reporting this, I will investigate further what is different in your project setup that makes Travis unable to find hoc-coveralls without export its PATH

@mrkkrp
Copy link
Author

mrkkrp commented Aug 17, 2015

@guillaume-nargeot I don't want to seem impatient, but is there any update on this issue?

@killy971
Copy link
Owner

I'm wondering if this could be due to the fact that your travis config uses language: c instead of language: haskell (which may add ~/.cabal/bin to the PATH behind the scene).

Is there a particular reason why you're using language: c?

@killy971 killy971 added the bug label Aug 18, 2015
@killy971 killy971 self-assigned this Aug 18, 2015
@mrkkrp
Copy link
Author

mrkkrp commented Aug 18, 2015

@guillaume-nargeot, since Megaparsec requires GHC 7.10 to work, I couldn't use built-in solutions provided by Travis CI. Common practice is to use https://github.com/hvr/multi-ghc-travis in this case, which provides GHC 7.10 and can be used to test several combinations of GHC/Cabal. It even supports testing with development version of GHC.

So, I took example .travis.yml file as base and edited it to suit needs of our project. As you can see the file contains the following lines:

# NB: don't set `language: haskell` here
language: c

Maybe language: haskell would cause some sort of conflict with built-in functionality?

@mrkkrp
Copy link
Author

mrkkrp commented Aug 30, 2015

Hi, @guillaume-nargeot, I've changed language setting to language: haskell and it improved the situation. You should probably include a note about language: haskell in your README.md file or something.

However, it still doesn't work: https://travis-ci.org/mrkkrp/megaparsec/jobs/77906944#L819

It says:

hpc-coveralls: can not find megap_KmgWkNOHHG00KMntE4AAGg/Text.Megaparsec.String in ["dist/hpc/vanilla/mix/megap_KmgWkNOHHG00KMntE4AAGg/"]

Text.Megaparsec.String is a module in library, I use it as a helper in tests too (definitions from the module are used), but I don't test function in it. So, HPC doesn't create directory for it. I've tried this:

after_script:
 - cabal install hpc-coveralls
 - hpc-coveralls --coverage-mode=StrictlyFullLines
                 --exclude-dir=tests
                 --exclude-dir=old-tests
                 --exclude-dir=benchmarks
                 --exclude-dir=Text/Megaparsec/ByteString
                 --exclude-dir=Text/Megaparsec/Text
                 tests old-tests

without success. Can you advise something?

@mrkkrp
Copy link
Author

mrkkrp commented Sep 6, 2015

Now it works, close the issue if you consider the problem solved.

@killy971
Copy link
Owner

killy971 commented Sep 6, 2015

I think it must have been solved by fixing the issue #44.
Happy to see that it finally works for you!

@killy971 killy971 closed this as completed Sep 6, 2015
@mrkkrp
Copy link
Author

mrkkrp commented Sep 6, 2015

@guillaume-nargeot, Thanks for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants