-
Notifications
You must be signed in to change notification settings - Fork 842
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
Change recommendation: include generated cabal files #5210
Comments
One problem with this approach that I encountered is that rebases become more painful. We have a repo with many packages, each one has It's not something critical, I just wanted to warn people about this inconvenience. |
I have been getting feedback from non-stack users complaining about repos with no cabal files. From their perspective it is frustrating so I am delighted with this proposal even if it might be a little more inconvenient. N retrospect Cabal files form the basis of the package system so it is better to include them directly. |
OK, I'm going to move ahead with this. Thanks for the responses all. Closing as the discussion is done, will be merged to |
This ties in to the overall goal of #5210. Lock files should no longer include packages without cabal files. We could either remove those from freeze files, or get rid of freeze files entirely. Since freeze files are already on their way out, may as well just cut them off entirely now.
This ties in to the overall goal of #5210. Lock files should no longer include packages without cabal files. We could either remove those from freeze files, or get rid of freeze files entirely. Since freeze files are already on their way out, may as well just cut them off entirely now.
Agreeing with gromakovsky that this can very often cause conflicts and pain when merging/cherry-picking/switching branches/trying different stack/hpack versions. I think it's worth changing hpack to fix this - if you agree, consider helping sol/hpack#380. |
Hi! Let me just describe one failure mode collateral from this change. Hopefully, it'll make searching for it easier and speed up resolutions. No response required. First, the error message:
Now the cause. In my case, local-development Stack v2.3.1 has produced unintended change to @@ -154,9 +140,6 @@ packages:
- completed:
size: 294200
url: https://github.com/private-company/vendor-fork-redacted/archive/fcbaf261368b7f63708351fb1b04eb7f5f0793a3.tar.gz
- cabal-file:
- size: 4079
- sha256: a24d964776e360d0545500c8b28ec254aa323fdf28fa55692a282a25b6ac652c
name: vendor-fork-redacted
version: 0.9.1
sha256: 54974f6f9851376292cb6f081eef2cd907396899a04af5776da2d2cc45e80fc6 Reverting this unintended change fixes the error (as well as updating Stack on CI). The error reporting could perhaps be better; but this behavior change is well-documented on the ChangeLog. Hope that helps |
Importing libraries without cabal files are now depricated See: commercialhaskell/stack#5210
* Added .cabal files to repo See: https://docs.haskellstack.org/en/stable/stack_yaml_vs_cabal_package_file/#should-i-check-in-generated-cabal-files commercialhaskell/stack#5210 * Fix haddock build
Avoids warnings from Stack. See commercialhaskell/stack#5210.
when building natural4 downstream, stack throws this error: ┌─[mengwong@rosegold] - [~/src/smucclaw/dsl/lib/haskell/natural4] - [2022-12-05 11:03:34] └─[0] <git:(main 1ace7ecc) > stack build DEPRECATED: The package at Archive from https://github.com/smucclaw/baby-l4/archive/a6410905279cc7ee4e9d8dc959e3e4a4019633f9.tar.gz does not include a cabal file. Instead, it includes an hpack package.yaml file for generating a cabal file. This usage is deprecated; please see commercialhaskell/stack#5210. Support for this workflow will be removed in the future. so, putting back the cabal file for now.
…d doing it * Includes .cabal file per commercialhaskell/stack#5210 * Updates package.yaml with the new dependencies. * Updates the stackage resolver in stack.yaml to force a version that is usable with my setup. Also updates stack.yaml.lock. * Updates the instructions in setup.hs and stack.yaml with the latest findings.
See commercialhaskell/stack#5210 and https://www.fpcomplete.com/blog/storing-generated-cabal-files/ for the rationale behind this.
See commercialhaskell/stack#5210 and https://www.fpcomplete.com/blog/storing-generated-cabal-files/ for the rationale behind this.
For details of the proposal, see the blog post: https://tech.fpcomplete.com/blog/storing-generated-cabal-files
If you are in favor of this change, please press thumbs up below. If you are opposed, please press thumbs down. Of course, feel free to include additional comments below.
The text was updated successfully, but these errors were encountered: