Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change 'optional-packages' default on missing cabal.project #6740

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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