-
Notifications
You must be signed in to change notification settings - Fork 701
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
Feature parity with Stack #8605
Comments
Would help to have links to respective stack documentation sections. |
@ulysses4ever Good idea, I added some links. |
Although I have switched from Stack to Cabal for development, I agree with this list and would like to see these things implemented. I think there are existing issues for some of them:
|
|
Regarding feature parity
(Although maybe like @tfausak some people just ignore the few missing features and use Cabal.) Regarding docsI'd eagerly read some kind of "cabal for stack enthusiasts" article which explains how to achieve all the things you're used to with stack from a proper stack user's perspective (not a cabal user who's vaguely aware of what stack can do or used it a little bit). ContributingI'm afraid I can't contribute any work towards this. I've done my time on Haskell tooling. 😂 Around 2015, I wrote the first commit on Stack and shaped some of its direction, alongside Michael Snoyman, Michael Sloan, Emanuel Borsboom. Tooling is Hard, especially Haskell as it's a moving target. The best outcome would be that the community converges again on one build tool. But it's taken years to get to this point and may take some more years yet! |
|
I think both automatic hpack execution and auto-expanding Stackage snapshot names to lockfiles are best done via hooks, since they break off nicely into discrete tasks that already have well-known public interfaces. (I admit for hpack specifically I am biased in that I don't like hpack's design decisions and don't want Cabal to endorse it.) |
I am curious how A ticket for multi-package code coverage would also be welcome. |
I think I agree, but I do think it would be nice if cabal could somehow select among the installed GHC versions for a particular project, perhaps by interfacing with ghcup. |
GHC by default includes executables with complete version numbers, cabal supports Personally, I have a setup where my "default" ghc is first in path, followed by all other installs. This causes All that would be needed to point a project to a specific GHC installed via ghcup would be: |
@merijn that is good to know, thank you |
@gbaz Stack keeps track of which test suites have been run since their dependencies have last changed and whether the run was successful (exit code 0, I guess). Then it doesn't rerun the test suite if it's already succeeded and the dependencies haven't changed. |
So, not actual parity, then? Another stack feature not yet mentioned:
|
I'm currently looking into IDE support for tests. I think that workflow has a lot of similarities, due to needing to report information about the available tests etc. We have some discussion ongoing at discourse. I will look into how stack handles this too... Edit: Commit for --no-rerun-tests support here |
Can someone specify what docker integration is and how it might work / what it does? |
The link has already been posted twice in this thread. Yes, this is easily possible via #7394 It would work the same way stack interfaces with ghcup today:
My guess is that it's trivial to implement. Hooks are a superior design to what stack does today. They allow to implement hpack support, GHC installation, patching of packages, custom toolchain checks, automatic caching of dependencies to S3,. ... |
Only two things are missing for me:
See: https://twitter.com/kerckhove_ts/status/1649526134193680384 |
@NorfairKing could you please reference documentation for --no-rerun-tests? I fail to find it in the stack manual. |
@ulysses4ever |
@NorfairKing fair, thank you. Do you know if it skips succeeded tests when only the testsuite itself changes? Or the library under test too? If it's the latter, it can bring false negatives, right? (Your change to the library broke a test that used to work but you don't notice that because the test is not rerun.) |
@ulysses4ever Every reverse-dependenty test suite is rerun when code changes, so there won't be false positives but sometimes too many test-runs. |
Unlikely to happen, IMO. But once the hooks design is actually generically implemented, you can run whatever you want before a build. |
@hasufell Where can I follow up on that progress? |
I'm guessing this is referring to |
Stack warns about unused package flags, #7813 (comment) |
Another cabal bug that stack hasn't: |
Eh, I disagree on it being a bug. If I choose to disable tests/benchmarks, I want them disabled. We could enable tests and/or benchmarks by default though (didn't we already do that?) |
I agree And no, we didn't enable tests (#7883) and/or benchmarks by default. The last development on this front, I think, was enabling docs by default when the user calls I wonder if the easiest (and reasonable) way to improve that would be to generate the default config with |
Another (backwards-compat) solution would be to introduce a new target |
Let's not pretend that's good design. It's atrocious and after 10 years of Haskell I'd fail every interview that asks me what the difference of both GHC flags are. |
With #9744, |
As for the comments in this thread about
Tests are included above because $ git diff
diff --git a/cabal.project b/cabal.project
index a2075cfdc..c2742cd46 100644
--- a/cabal.project
+++ b/cabal.project
@@ -3,7 +3,6 @@ import: project-cabal/ghc-latest.config
import: project-cabal/pkgs.config
import: project-cabal/constraints.config
-tests: True
Footnotes
|
I would love to switch away from stack for development, but there are some real and important things missing to do so.
In this issue I'd like to list those with checkboxes, in case feature-parity with stack is something the cabal team would want to achieve:
cabal test all --no-rerun-tests
: Don't rerun test suites that have already passed.cabal test all --coverage
: Multi-package code coverage reportscabal build all --file-watch
: File watching. This is arguably not cabal's responsibility because you can do something close-enough with feedback for example, but cabal is haskell-build-process-aware and could do better than feedback can.hpack
when necessary.--pedantic
Not available and not desirable IMO:
UPD More ideas from the discussion below:
cabal repl
a lastack repl
.stack
documentation)The text was updated successfully, but these errors were encountered: