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

hpack generates wrong cabal file the first time #5873

Closed
brandon-leapyear opened this issue Sep 20, 2022 · 2 comments
Closed

hpack generates wrong cabal file the first time #5873

brandon-leapyear opened this issue Sep 20, 2022 · 2 comments

Comments

@brandon-leapyear
Copy link
Contributor

brandon-leapyear commented Sep 20, 2022

General summary/comments (optional)

I'm putting the issue here because I'm assuming the issue is something to do with the way Stack invokes hpack.

Steps to reproduce

  1. stack new foo
  2. cd foo
  3. rm foo.cabal
  4. (Optional) Add verbatim: { cabal-version: 2.2 } to the top of package.yaml (
  5. Add verbatim: { import: foo } to the library stanza in package.yaml
  6. stack build
  7. foo.cabal has import: foo at bottom of library stanza (which is incorrect)
  8. stack build
  9. foo.cabal has import: foo at top of library stanza (correct)

Expected

Should have import: foo at the top of the stanza (sol/hpack#490)

Actual

Had it at the bottom the first time, then corrected the second time.

For some reason, stack path generates the cabal file twice, so running stack path once will generate the incorrect version, then the correct version immediately after

Stack version

stack --version
Version 2.9.1, Git revision 409d56031b4240221d656db09b2ba476fe6bb5b1 x86_64 hpack-0.35.0

Method of installation

  • Official binary, downloaded via haskellstack.org or from Stack's repository
  • Via GHCup
  • Via Cabal (the tool)
  • An unofficial package repository (please specify which)
  • Other (please specify)
@brandon-leapyear
Copy link
Contributor Author

brandon-leapyear commented Sep 20, 2022

This is an old work account. Please reference @brandonchinn178 for all future communication


Never mind, this is an hpack issue. Corresponding issue: sol/hpack#522

@brandon-leapyear brandon-leapyear closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2022
@mpilgrem
Copy link
Member

@brandon-leapyear, thanks for reporting and following up.

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

No branches or pull requests

2 participants