Skip to content

Adds a cabal.project file. #5860

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

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

philderbeast
Copy link
Contributor

People (like me) that might like to use cabal to work on stack shouldn't need to first resolve dependencies. We can help with that. Before this fix:

> cabal build all --enable-tests --enable-benchmarks
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: stack-2.10.0 (user goal)
[__1] trying: template-haskell-2.19.0.0/installed-2.19.0.0 (dependency of
stack)
[__2] next goal: persistent (dependency of stack)
[__2] rejecting: persistent-2.14.2.0 (conflict: stack => persistent>=2.13.3.5
&& <2.14)
[__2] skipping: persistent-2.14.1.0, persistent-2.14.0.3, persistent-2.14.0.2,
persistent-2.14.0.1 (has the same characteristics that caused the previous
version to fail: excluded by constraint '>=2.13.3.5 && <2.14' from 'stack')
[__2] rejecting: persistent-2.13.3.5 (conflict:
template-haskell==2.19.0.0/installed-2.19.0.0, persistent =>
template-haskell>=2.13 && <2.19)
[__2] skipping: persistent-2.13.3.4, persistent-2.13.3.3, persistent-2.13.3.1,
persistent-2.13.3.0, persistent-2.13.2.2, persistent-2.13.2.1,
persistent-2.13.1.2, persistent-2.13.1.1, persistent-2.13.1.0,
persistent-2.13.0.4, persistent-2.13.0.3, persistent-2.13.0.2,
persistent-2.13.0.1, persistent-2.13.0.0, persistent-2.12.1.2,
persistent-2.12.1.1, persistent-2.12.1.0, persistent-2.12.0.2 (has the same
characteristics that caused the previous version to fail: excludes
'template-haskell' version 2.19.0.0)
[__2] rejecting: persistent-2.11.0.4 (conflict: stack => persistent>=2.13.3.5
&& <2.14)
[__2] skipping: persistent-2.11.0.2, persistent-2.11.0.1, persistent-2.11.0.0,
persistent-2.10.5.4, persistent-2.10.5.3, persistent-2.10.5.2,
persistent-2.10.5.1, persistent-2.10.5, persistent-2.10.4, persistent-2.10.3,
persistent-2.10.2, persistent-2.10.1, persistent-2.10.0, persistent-2.9.2,
persistent-2.9.1, persistent-2.9.0, persistent-2.8.2, persistent-2.8.1,
persistent-2.8.0, persistent-2.7.3.1, persistent-2.7.3, persistent-2.7.1,
persistent-2.7.0, persistent-2.6.1, persistent-2.6, persistent-2.5,
persistent-2.2.4.1, persistent-2.2.4, persistent-2.2.3, persistent-2.2.2.1,
persistent-2.2.2, persistent-2.2.1, persistent-2.2, persistent-2.1.6,
persistent-2.1.5, persistent-2.1.4, persistent-2.1.3, persistent-2.1.2,
persistent-2.1.1.7, persistent-2.1.1.6, persistent-2.1.1.5,
persistent-2.1.1.4, persistent-2.1.1.3, persistent-2.1.1.2,
persistent-2.1.1.1, persistent-2.1.1, persistent-2.1.0.2, persistent-2.1.0.1,
persistent-2.1, persistent-1.3.3, persistent-1.3.2, persistent-1.3.1.1,
persistent-1.3.1, persistent-1.3.0.6, persistent-1.3.0.5, persistent-1.3.0.4,
persistent-1.3.0.3, persistent-1.3.0.2, persistent-1.3.0, persistent-1.2.3.3,
persistent-1.2.3.2, persistent-1.2.3.0, persistent-1.2.2.0,
persistent-1.2.1.2, persistent-1.2.1.1, persistent-1.2.1, persistent-1.2.0.2,
persistent-1.2.0.1, persistent-1.2.0, persistent-1.1.5.1, persistent-1.1.5,
persistent-1.1.4, persistent-1.1.3.2, persistent-1.1.3.1, persistent-1.1.3,
persistent-1.1.2, persistent-1.1.0.1, persistent-1.1.0, persistent-1.0.2.2,
persistent-1.0.2.1, persistent-1.0.2, persistent-1.0.1.3, persistent-1.0.1.2,
persistent-1.0.1.1, persistent-1.0.1, persistent-1.0.0, persistent-0.9.0.4,
persistent-0.9.0.3, persistent-0.9.0.2, persistent-0.9.0.1, persistent-0.9.0,
persistent-0.8.0.2, persistent-0.8.0.1, persistent-0.8.0, persistent-0.7.0.1,
persistent-0.7.0, persistent-0.6.4.4, persistent-0.6.4.3, persistent-0.6.4.2,
persistent-0.6.4.1, persistent-0.6.4, persistent-0.6.3, persistent-0.6.2,
persistent-0.6.1, persistent-0.5.1, persistent-0.5.0, persistent-0.4.2,
persistent-0.4.1, persistent-0.4.0.1, persistent-0.4.0, persistent-0.3.1.3,
persistent-0.3.1.2, persistent-0.3.1.1, persistent-0.3.1, persistent-0.3.0.1,
persistent-0.3.0, persistent-0.2.4.1, persistent-0.2.4, persistent-0.2.3,
persistent-0.2.2.2, persistent-0.2.2.1, persistent-0.2.2, persistent-0.2.1,
persistent-0.2.0.2, persistent-0.2.0.1, persistent-0.2.0, persistent-0.1.0,
persistent-0.0.0.1, persistent-0.0.0, persistent-2.14.0.0,
persistent-2.13.3.2, persistent-2.12.0.1, persistent-2.12.0.0,
persistent-2.11.0.3, persistent-2.7.2, persistent-2.0.8, persistent-2.0.7.1,
persistent-2.0.7, persistent-2.0.5.1, persistent-2.0.5, persistent-2.0.4,
persistent-2.0.3.1, persistent-2.0.3, persistent-2.0.2, persistent-2.0.1.1,
persistent-2.0.1, persistent-2.0.0.1, persistent-2.0.0, persistent-1.2.3.1
(has the same characteristics that caused the previous version to fail:
excluded by constraint '>=2.13.3.5 && <2.14' from 'stack')
[__2] fail (backjumping, conflict set: persistent, stack, template-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: stack, persistent, template-haskell

After this fix:

> cabal build all --enable-tests --enable-benchmarks
Up to date
> cabal test all --test-show-details=always
...
> cabal run stack -- --help
...
> cabal repl lib:stack
...

@mpilgrem
Copy link
Member

mpilgrem commented Sep 11, 2022

It is a small proposed addition to the respository, but would users of build tools other than Stack not configure their tools locally - and set their .git\info\exclude so as not check-in their local configuration to the repostitory? For example, we don't check-in a 'cradle' file for people who use the 'Haskell' extension to Visual Studio Code. Partly my concern is 'maintainability' - this addition is small, but it still requires some understanding of Cabal (the tool).

@philderbeast
Copy link
Contributor Author

philderbeast commented Sep 11, 2022

See #4571. I think it helps being bilingual (in the two dominant Haskell build tools), especially in circumstances where one is better than the other (both have their strengths and weaknesses).

I don't see much problem in the cabal.project going stale. At least this way a cabal native speaker will have a starting point if they want to contribute to stack (which is something I'd like to encourage).

@mpilgrem
Copy link
Member

I don't want to discourage anybody from helping to take Stack forward. I may add some explanatory comments at the start of the file to help non-Cabal users maintain it.

@mpilgrem mpilgrem merged commit fa15a5f into commercialhaskell:master Sep 11, 2022
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

Successfully merging this pull request may close these issues.

2 participants