haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.61k stars 691 forks source link

Unable to generate logs at the specified location. #6811

Open awasthishubh opened 4 years ago

awasthishubh commented 4 years ago

Describe the bug I am currently working on updating Hackage builder to cabal v2 as a part of GSoC Project. The objective was to build the package, run tests, create Haddock doc and run code-coverage. I need the report of each of these tasks in the specified files. I tried setting the flags to make cabal write test log, build-summary, logs and docs at the specified location but it doesn't seem to work.

To Reproduce In the root directory of a package (async in this case), I ran the following code.

$ cabal v2-build \
    --enable-tests \
    --run-tests \
    --test-log="/home/USER/haskell/test.log" \
    --haddock-for-hackage \
    --enable-doc \
    --docdir="/home/USER/haskell/" \
    --enable-coverage \
    --build-summary="/home/USER/haskell/r.report" \
    --build-log="/home/USER/haskell/r.log" \
    --remote-build-reporting=detailed \
    --report-planning-failure

Expected behavior Specified files must have a log or report content.

System information

Additional context How can we set coverage report, doc tarball location?

gbaz commented 4 years ago

I think there are two independent questions here. The test stuff can at least get rum from the test command. Even without that though, the build-summary and build-log don't seem to get generated at all from my experiments? What's the correct way to get them in v2?

ulysses4ever commented 2 years ago

@jneira could you comment on the label “not our bug” (which you added): I don’t quite get why it’s not “our”…

jneira commented 2 years ago

me neither 😅 it was a misclick I suppose, thanks for noting it

ulysses4ever commented 2 years ago

Looks similar to #5901.

andreabedini commented 1 year ago

TIL about --run-tests; it seems confusing though as the documentation says "Run the package test suite upon installation" but there's no installation if you pass it to cabal build; it also mentions a hash maybe it means the store? It sounds dangerous to mix up installation with the cabal store as they are different concepts.