Skip to content

Commit e7dfd6d

Browse files
committed
Change 'optional-packages' default on missing cabal.project
Fixes #6739
1 parent b89a1c6 commit e7dfd6d

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Cabal/doc/cabal-project.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ project are:
6767
.. cfg-field:: optional-packages: package location list (space or comma-separated)
6868
:synopsis: Optional project packages.
6969

70-
:default: ``./*/*.cabal``
70+
:default: empty
7171

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

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

9697
packages: ./*.cabal
9798
optional-packages: ./*/*.cabal
9899

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

cabal-install/Distribution/Client/ProjectConfig.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,6 @@ readProjectLocalConfigOrDefault verbosity distDirLayout = do
544544
-- We expect a package in the current directory.
545545
projectPackages = [ "./*.cabal" ],
546546

547-
-- This is to automatically pick up deps that we unpack locally.
548-
projectPackagesOptional = [ "./*/*.cabal" ],
549-
550547
projectConfigProvenance = Set.singleton Implicit
551548
}
552549

changelog.d/issue-6739

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
synopsis: Change 'optional-packages' default to empty, when cabal.project is mising.
2+
issues: #6739
3+
prs: #6740

0 commit comments

Comments
 (0)