Skip to content

Allow stack init when local packages also figure in the deps of deps #1965

Closed
@harendra-kumar

Description

@harendra-kumar

This problem was discovered from the question asked on haskell-stack regarding stack init of https://github.com/haskell-servant/servant-snap. Which is a bit complicated due to a lot of dependencies cloned in the same project and local packages figuring in the dependencies of dependencies as well.

We use --only-dependencies flag for cabal solver. When some local packages also figure in the dependencies of dependencies of other packages in the project then cabal refuses to proceed with the following message:

>>>> Cabal errors begin                                                                                                                                                           
cabal: Cannot select only the dependencies (as requested by the                                                                                                                   
'--only-dependencies' flag), the packages are required by a dependency of one                                                                                                     
of the other targets.                                                                                                                                                             
<<<< Cabal errors end 

I removed the --only-dependencies flag from the cabal invocation to allow this case. I could not think of any potential issues due to this but I might be missing something. Will send a pull request.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions