Skip to content

Commit

Permalink
Merge pull request #6740 from hasufell/jospald/PR/6739
Browse files Browse the repository at this point in the history
Change 'optional-packages' default on missing cabal.project
  • Loading branch information
phadej authored May 4, 2020
2 parents b15210e + e7dfd6d commit 86766bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Cabal/doc/cabal-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ project are:
.. cfg-field:: optional-packages: package location list (space or comma-separated)
:synopsis: Optional project packages.

:default: ``./*/*.cabal``
:default: empty

Like :cfg-field:`packages`, specifies a list of package locations
containing local packages to be built. Unlike :cfg-field:`packages`,
Expand All @@ -90,13 +90,14 @@ project are:

All local packages are *vendored*, in the sense that if other packages
(including external ones from Hackage) depend on a package with the name
of a local package, the local package is preferentially used. This
motivates the default settings::
of a local package, the local package is preferentially used.
For subdirectories to be considered local packages, the following setting
can be used::

packages: ./*.cabal
optional-packages: ./*/*.cabal

...any package can be vendored simply by making a checkout in the
...then any package can be vendored simply by making a checkout in the
top-level project directory, as might be seen in this hypothetical
directory layout::

Expand Down
3 changes: 0 additions & 3 deletions cabal-install/Distribution/Client/ProjectConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,6 @@ readProjectLocalConfigOrDefault verbosity distDirLayout = do
-- We expect a package in the current directory.
projectPackages = [ "./*.cabal" ],

-- This is to automatically pick up deps that we unpack locally.
projectPackagesOptional = [ "./*/*.cabal" ],

projectConfigProvenance = Set.singleton Implicit
}

Expand Down
3 changes: 3 additions & 0 deletions changelog.d/issue-6739
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Change 'optional-packages' default to empty, when cabal.project is mising.
issues: #6739
prs: #6740

0 comments on commit 86766bf

Please sign in to comment.