Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

lost git info using cabal v2-install #23

Closed
jneira opened this issue Jan 2, 2020 · 2 comments
Closed

lost git info using cabal v2-install #23

jneira opened this issue Jan 2, 2020 · 2 comments

Comments

@jneira
Copy link

jneira commented Jan 2, 2020

  • cabal v2-install builds the excutable in a temp directory, instead use the generated locally in the project dir
    • in that directory there is no .git to extract the required info
  • cabal v2-run my-program works as intended
  • the workaround is to use the local copy of the executable inside dist-newstyle, generated by cabal v2-build
  • not sure if the solution could be being able to use a directory outside the project (see Get information from outside of the project #18)
gallais added a commit to msp-strath/Mary that referenced this issue Apr 17, 2020
Note that the git hash will only be included if you compile the project
using `cabal v1-install` because `v2-install` uses a temporary directory
outside of the git project to do the build...

Cf. acfoltzer/gitrev#23
@jsoo1
Copy link

jsoo1 commented Apr 23, 2020

I just ran into the same issue

@s5k6
Copy link

s5k6 commented Jul 21, 2021

Hi,

I would like to point out this issue I've just raised at Cabal. I think instead of working around/against cabal v2-install, making Cabal discern files generated before sdist and after, would solve this issue, and maybe others.

In the issue referenced above, I'm asking for feedback and insights from people with a deeper understanding of the Cabal build process. Maybe you could chime in over there…

Cheers
Stefan

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

No branches or pull requests

3 participants