Skip to content

Add an include-with-filtering mechanism for config files #2238

Closed

Description

@23Skidoo

In #2226 I changed how list fields work in config files to make the behaviour less surprising. This is still not quite satisfactory: ideally we'd want to replace implicit inheritance with an explicit include mechanism to make it more obvious what happens. So, for example, instead of implicitly mappending cabal.config with cabal.sandbox.config and ~/.cabal/config, we would require the user to write

include ~/.cabal/config
include cabal.sandbox.config

[...]

in cabal.config. There should also be a filtering mechanism to make it possible to override list fields. Example:

include ~/.cabal/config hiding (remote-repo)

Activity

  1. added this to the milestone on Apr 24, 2015
  2. modified the milestones: cabal-install 1.24, on Feb 21, 2016
  3. modified the milestone: cabal-install 2.0 on Sep 6, 2016
  4. jneira commented on Mar 17, 2022

    @jneira
    Member

    cabal sandbox was removed and although afaik cabal.config and ~/cabal/config continue working and used, now the focus is on cabal.project* files. There is an ongoing work to add the include mechanism for them: #7783

    so maybe we could close this one?

  5. gbaz commented on Mar 25, 2022

    @gbaz
    Collaborator

    agreed.

  6. added a commit that references this issue on Mar 29, 2025
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions