Skip to content

allow per-package configuration options in config file #216

Closed
@bos

Description

@bos

(Imported from Trac #223, reported by @dcoutts on 2008-01-29)

Currently only a subset of the configure command line flags can be stored in cabal-install's config file. There is no particularly good reason for this. It should be reasonably straightforward to do it generically and allow all configure options to be kept in the config file.

This may require some unification of the API for managing command line flags (the Simple.Command module) and the API for loading and saving from config flags (in ParseUtils?).

Once this is done, it should be straightforward to keep per-package config options as well as global options in the cabal-install config file.

These could be used to augment the options used when configuring a package. The order of overriding in cabal-install is currently:

savedConfig `mappend` configFlags
That is, the configure options from the config file are overridden by the ones supplied on the command line. With per-package saved config we would extend this to:
globalSavedConfig `mappend` packageSavedConfig pkg `mappend` configFlags
ie per-package saved, overrides global saved, but command line still overrides everything.

The slightly tricky bit is in how the api for config files and command line flags should be made to work better with each other, so that one set of information can be read/written from either source. The rest should be straightforward.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions