cabal-bounds
cabal-bounds copied to clipboard
Support projects using cabal.project
Multi-package projects using cabal.project files have one dist-newstyle in the root directory instead of having one for every package. cabal-bounds won't find this folder when run inside a specific package, and doesn't have a way to target packages from outside.
Do you think just searching for the dist-newstyle directory in the root directories should do the job?
Does the dist-newstyle/cache/plan.json file in the root directory then contain the build dependencies of all packages?
It looks like the plan.json just has all the dependencies for all of the packages yes. So using it would require manually building the dependency tree using the name of the package in the current directory to find the associated root package in the plan.json.
It seems like the Cabal library should have support for figuring these things out but a quick search suggests that everything for interacting with cabal.project files is internal and only exposed to cabal-install, which seems weird. It looks like there's an issue for adding a flag to ignore the project when building haskell/cabal#7057 but that presumably won't work if the package depends on another package in the project, which is the whole point of projects.
Can you send me a ˋplan.jsonˋ file for such a multi package project.
So projects are mostly about local dependencies? This means that cabal doesn‘t support local paths as dependencies in a cabal file? With all these different package managers it sometimes gets a bit confusing which one supports what.