-
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
Add project-plan command #6885
Comments
Another use case might be ghcup using this to figure out a suitable GHC version for a project: https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/99 |
|
Late to the party but it turns out I had a go a this. I requires moving few things around but IIRC no roadblocks. I had a version of ProjectPlanning.hs that takes compiler, platform and arch as parameters. The only issue was with pkg-config, as we cannot know in advance which packages might be relevant for the plan. Perhaps we could overapproximate the set of relevant pkgconfig entries and report that to the user? I am not sure how this would work. Let me know if there's still interest. |
EDIT: Note that my original request was asking to take the whole global package db as an input as well. E.g. on linux you don't have |
That might be the only solution.
Good point. Now I remember another thing that wasn't entirely trivial: cabal-install wants to know a lot about the compiler (it calls |
If you say other-extensions: SomethingFancy and the compiler doesn't know it, solver will take that into account. (E.g. say you want i.e. a capability based compiler support. (It would been better if extensions didn't change, but that works well for things like |
I have made a poc https://github.com/andreabedini/cabal-solver-plan |
You can force project planning by using
cabal build --dry
. That command is however requires that you in fact have build environment set up. Theproject-plan
should be able to take all required information as separate input (compiler information, installed package info db, pkgconfig db, ...).project-plan
would both useful for system independent testing (simulating various scenarios, where setting up environment is just too tricky for CI), and we can use it to produce plans for cabal's new bootstrap (#6700).cc @angerman @bgamari
I suspect that this will require some non-trivial changes inside
cabal-install
, but I do think they will be for better, making implicits explicit.The text was updated successfully, but these errors were encountered: