Skip to content

No package is an island #1367

Closed
Closed

Description

@23Skidoo

As described in @tibbe's "Cabal of my dreams" blog post, we'd like to move from a package-centric model to a source-tree based model.

Quoting @tibbe's post:

We frequently have to work on multiple dependent packages at once and thus we also need a way to build them together, without registering the by-products in some shared package database. For example, given this directory structure

src
  |-- foo
  |  | -- foo.cabal
  |-- bar
     | -- bar.cabal

where foo is a package that depends on bar, I should be able to do

cd src
cabal build foo

and that better traverse the directory structure, find, and build dependencies and use them when compiling foo.

Aside: This could be implemented in a few different, more or less explicit, ways e.g. by specifying the directories used to search for dependencies explicitly, as in

cd src/foo
cabal build --root-dir=~/src

Activity

  1. dcoutts commented on Oct 17, 2013

    @dcoutts
    Contributor

    Whatever rule we use, it has to be clear at all times what package environment we are in. In the above example the obvious thing is to make a package env at the src level and declare that all the subdirs are in that env, so cd'ing around there doesn't change your env. And of course behind the scenes these things do have to be registered in some shared package db -- the one for this env.

  2. tibbe commented on Nov 11, 2013

    @tibbe
    Contributor

    See #1576 for some more description of the task.

  3. 23Skidoo commented on Dec 13, 2014

    @23Skidoo
    MemberAuthor

    See also #921.

  4. added this to the milestone on Apr 23, 2015
  5. ezyang commented on May 5, 2016

    @ezyang
    Contributor

    This is solved by cabal.project files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions