Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: haskell/cabal
...
head fork: haskell/cabal
This comparison is big! We're only showing the most recent 250 commits
Commits on Mar 21, 2015
@edsko edsko Document unused graph traversal functions
Both cabal-install and `Cabal` define a notion of a package index.
`Cabal` defines

    data PackageIndex a = PackageIndex !(Map InstalledPackageId a) !(Map PackageName (Map Version [a]))

whereas `cabal-install` defines

    newtype PackageIndex pkg = PackageIndex (Map PackageName [pkg])

Note that Cabal.PackageIndex is indexed by installed package IDs, whereas
CabalInstall.PackageIndex is indexed by package names.

There are a bunch of "graph traversal" functions that similarly duplicated
between `Cabal` and `cabal-install`; in `Cabal` we have

    brokenPackages            :: PackageInstalled a => PackageIndex a -> [(a, [InstalledPackageId])]
    dependencyClosure         :: PackageInstalled a => PackageIndex a -> [InstalledPackageId] -> Either (PackageIndex a) [(a, [InstalledPackageId])]
    dependencyCycles          :: PackageInstalled a => PackageIndex a -> [[a]]
    dependencyGraph           :: PackageInstalled a => PackageIndex a -> (Graph.Graph, Graph.Vertex -> a, InstalledPackageId -> Maybe Graph.Vertex)
    dependencyInconsistencies :: PackageInstalled a => PackageIndex a -> [(PackageName, [(PackageId, Version)])]
    reverseDependencyClosure  :: PackageInstalled a => PackageIndex a -> [InstalledPackageId] -> [a]
    reverseTopologicalOrder   :: PackageInstalled a => PackageIndex a -> [a]
    topologicalOrder          :: PackageInstalled a => PackageIndex a -> [a]

which are mirrored in `cabal-install` as

    brokenPackages            :: PackageFixedDeps pkg => PackageIndex pkg -> [(pkg, [PackageIdentifier])]
    dependencyClosure         :: PackageFixedDeps pkg => PackageIndex pkg -> [PackageIdentifier] -> Either (PackageIndex pkg) [(pkg, [PackageIdentifier])]
    dependencyCycles          :: PackageFixedDeps pkg => PackageIndex pkg -> [[pkg]]
    dependencyGraph           :: PackageFixedDeps pkg => PackageIndex pkg -> (Graph.Graph, Graph.Vertex -> pkg, PackageIdentifier -> Maybe Graph.Vertex)
    dependencyInconsistencies :: PackageFixedDeps pkg => PackageIndex pkg -> [(PackageName, [(PackageIdentifier, Version)])]
    reverseDependencyClosure  :: PackageFixedDeps pkg => PackageIndex pkg -> [PackageIdentifier] -> [pkg]
    reverseTopologicalOrder   :: PackageFixedDeps pkg => PackageIndex pkg -> [pkg]
    topologicalOrder          :: PackageFixedDeps pkg => PackageIndex pkg -> [pkg]

This by itself makes a certain amount of sense, but here's where the situation
gets confusing. `cabal-install` defines a `PlanIndex` as

    type PlanIndex = Cabal.PackageIndex PlanPackage

Note that is using `Cabal`'s notion of a PackageIndex, not `cabal-install`'s; it
makes sense that a PlanIndex is indexed by installed package IDs rather than
package names (even if currently we have to fake installed package IDs.

Almost all of the functions listed above, however, are only called on
`PlanIndex`s. This means that we invoke the functions from `Cabal`, not the
functions from `cabal-install`; in fact, almost all these functions in
`cabal-install` are completely unused right now.

    In `cabal-install`     but calls from `Cabal`
    ----------------------------------------------------------
    closed                 brokenPackages
    acyclic                dependencyCycles
    consistent             dependencyInconsistencies
    problems               brokenPackages', dependencyCycles',
                             dependencyInconsistencies'

This is more than just a code clean-up issue. As mentioned in the previous PR,
the fundamental difference between Cabal and cabal-install is their view of
dependencies: Cabal knows only about installed libraries and their library
dependencies, whereas cabal knows about packages and the dependencies of their
setup scripts, executables, test-suites, benchmarks, as well as their library
dependencies.

By calling the graph-traversal functions from `Cabal` rather than from
`cabal-install`, any of these additional dependencies are either completely
ignored, or else the distinction is lost (depending on how we implemented
installedDepends for plan packages); and neither option is correct.

For example, in `new` from Distribution.Client.InstallPlan (in `cabal-install`)
we call `dependendyGraph` on the plan index; since the plan index is defined in
terms of Cabal's plan index, we call Cabal's `dependencyGraph` here, but that
means that this graph will completely lack any setup dependencies. The reverse
graph is used in (only one place): `packagedThatDependOn`, which in turn is
(only) used in `failed`. But this is wrong: if a package fails to install, if
another package depends on it through a setup dependency, then that second
package should also be marked as impossible to install.

What needs to happen is that we modify the graph traversal functions from
`cabal-install` to take a PackageIndex from `Cabal` (so that we can apply them
to a PlanIndex), but use the dependencies from `FixedPackageDeps` rather than
the flat or incomplete dependencies we get from `PackageInstalled`. In fact,
the whole `PackageInstalled` instance for `ConfiguredPackage`, `ReadyPackage`
and `PlanPackage` should go: returning only part of the dependencies, or else
all dependencies flattened, is just too error prone.

This first commit only documents the problem (this commit message) and moves the
above functions to a new module called Distribution.Client.PlanIndex.

Cleaning this up is complicated by the fact that we _do_ still call two of the
above functions on a `CabalInstall.PackageIndex`:

* `pruneInstallPlan` from `Distribution.Client.Freeze` calls `dependencyClosure`
* The top-down solver calls `dependencyGraph`

If we change the above functions to work on a `Cabal.PackageIndex` instead these
two exceptions will break, so we need to look at that first.
1beba1b
@edsko edsko Avoid package index conversion
Introduce

    dependencyClosure :: InstallPlan
                      -> [PackageIdentifier]
                      -> Either (PackageIndex PlanPackage) [(PlanPackage, [InstalledPackageId])]

And use this in the definition of `pruneInstallPlan` in `freeze`, to avoid
first converting an install plan from a `Cabal.PackageIndex` to a
`CabalInstall.PackageIndex`.

This resolves the first of the two irregularities mentioned in the previous
commit.
e866b5e
@edsko edsko Make top-down solver more independent
Give the top-down solver it's own copy of `dependencyGraph`. This means that we
now have three independent implementations of `dependencyGraph`:

- `dependencyGraph` in `Cabal` takes a package index indexed by installed
  package IDs and only has access to library dependencies.
- `dependencyGraph` in `Distribution.Client.PlanIndex` in `cabal-install` takes
  a package index indexed by installed package IDs and has access to all
  dependencies.
- `dependencyGraph` in the top-down solver in `cabal-install` takes a package
  index indexed by package _names_, and has access to all dependencies.

Ideally we would switch the top-down solver over to use a package indexed by
installed package IDs, so that this duplication could be avoided, but that's a
bit of work and the top-down solver is legacy code anyway. Can still do that
later, of course.

Moreover, this makes the top-down solver monomorphic where possible, and
introduce its own SourceDeps class so that it is independent of the FixedDeps
class (which we will change over to use InstalledPackageIds instead).
3453175
@edsko edsko Avoid forgetting known installed package IDs
Introduce ConfiguredId:

    -- | A ConfiguredId is a package ID for a configured package.
    --
    -- Once we configure a source package we know it's InstalledPackageId (at
    -- least, in principle, even if we have to fake it currently). It is still
    -- however useful in lots of places to also know the source ID for the
    -- package.  We therefore bundle the two.
    --
    -- An already installed package of course is also "configured" (all it's
    -- configuration parameters and dependencies have been specified).
    --
    -- TODO: I wonder if it would make sense to promote this datatype to Cabal
    -- and use it consistently instead of InstalledPackageIds?
    data ConfiguredId = ConfiguredId {
        confSrcId  :: PackageId
      , confInstId :: InstalledPackageId
      }

And use it for ConfiguredPackage. As the comment says, though, I wonder if we
should use this in more places.

One slightly tricky thing here is that the output of both solvers had to be
modified to keep installed package IDs where possible; in the modular solver
this was easy enough, as it does this properly, but in the top-down solver this
is a bit of a hack; however, I’ve documented the hack in detail inline in the
code.

NOTE: Although this change is currently mostly cosmetic, in the future, once we
drop the single instance restriction, it is very important that we don't
convert from installed package IDs to source IDs and then back to installed
package IDs, as this conversion will be lossy.
daecdef
@edsko edsko Change PackageFixedDeps to use installed IDs
Take advantage in cabal-install of the new
HasInstalledPackageId/PackagedInstall split in Cabal.  The graph traversal
functions in cabal-install, previously redundant, are now back in use. Their
types match the ones in Cabal, with only the difference in the PackageInstalled
(Cabal) versus PackageFixedDeps (cabal-install) type class.

The only PackageInstalled instance left in Cabal is for InstalledPackage, which
is a thin wrapper around InstalledPackageInfo; with these refactorings in
place, InstalledPackage is there only to support the TopDown solver. The fact
that we won't have PackageInstalled instances anymore for PlanPackage and co
means that we are forced to call the correct graph traversal functions (from
cabal-install, rather than from Cabal).
ea22d11
Commits on Mar 23, 2015
@edsko edsko Add PlanIndex to other-modules f1f54c9
Commits on Mar 24, 2015
@23Skidoo 23Skidoo .travis.yml: 'ansi-wl-pprint' is no longer broken. fea6121
Commits on Mar 25, 2015
@edsko edsko Update code comments
This addresses commit commemts

* #2488 (comment)
* #2488 (comment)
* #2488 (comment)

from @23Skidoo.
0ff6341
Commits on Mar 26, 2015
@23Skidoo 23Skidoo .travis.yml: Unbreak the build.
[ci skip]
148d7e4
@edsko edsko Remove FakeMap completely from Cabal
It's now only used in cabal-install.
bd3b328
@luite luite fix ghcjs-pkg version number handling 975fc46
@23Skidoo 23Skidoo Merge pull request #2487 from edsko/pr/typeclasses
Minor type class cleanup
6a40009
@23Skidoo 23Skidoo Disable missing import lists warning for the 'Paths_' module.
The option '-fno-missing-import-lists' is available in all supported GHC
versions (looks like it was introduced in 7.0).

Fixes #2469.
775516c
@23Skidoo 23Skidoo Typo. 16bc4a4
@23Skidoo 23Skidoo Merge pull request #2488 from edsko/pr/graph-traversal
Clean up graph traversal code
26017fe
@23Skidoo 23Skidoo -Wall police.
GHC HEAD now warns about redundant constraints.
2d65506
@23Skidoo 23Skidoo 80-col violations. 745d0e6
@23Skidoo 23Skidoo Merge pull request #2496 from 23Skidoo/wall-police
-Wall police
d1070db
@23Skidoo 23Skidoo Handle more 'strip --version' output formats.
Fixes #2497.
1471271
Commits on Mar 27, 2015
@23Skidoo 23Skidoo Merge pull request #2498 from 23Skidoo/issue-2497
Handle more 'strip --version' output formats.
46fef7d
@23Skidoo 23Skidoo -Wall police, 80-col violations. f4727ba
@dcoutts dcoutts Remove the solver's scope and encapsulation mechanism
It turns out not to be the right solution for general private
dependencies and is just complicated. However we keep qualified
goals, just much simpler. Now dependencies simply inherit the
qualification of their parent goal. This gets us closer to the
intended behaviour for the --independent-goals feature, and for
the simpler case of private dependencies for setup scripts.

When not using --independent-goals, the solver behaves exactly as
before (tested by comparing solver logs for a hard hackage goal).
When using --independent-goals, now every dep of each independent
goal is qualified, so the dependencies are solved completely
independently (which is actually too much still).
4053927
@edsko edsko Add union operation to PSQ 2085511
@edsko edsko Prefer base no matter the qualifier 6b7fe10
@edsko edsko Make PP (PackagePath) structured type 3a1f1f2
@edsko edsko Introduce POption
POption annotates a package choice with a "linked to" field. This commit
just introduces the datatype and deals with the immediate fallout, it doesn't
actually use the field for anything.
66f2b23
@edsko edsko Add single instance restriction 6b85cdc
@edsko edsko Prefer to link when possible ce955ec
@edsko edsko Actually add link nodes
This is implemented as a separate pass so that it can be understood
independently of the rest of the solver.
7e192b2
@edsko edsko Link validation ae377ae
@edsko edsko Deal with independent goals in plan validation
In particular, in the definition of dependencyInconsistencies.

One slightly annoying thing is that in order to validate an install plan, we
need to know if the goals are to be considered independent. This means we need
to pass an additional Bool to a few functions; to limit the number of functions
where this is necessary, also recorded whether or not goals are independent as
part of the InstallPlan itself.
d56e1d8
@edsko edsko Unit tests for the solver
Since we didn't really have a unit test setup for the solver yet, this
introduces some basic tests for solver, as well as tests for independent goals
specifically.
1885fb8
@edsko edsko Add Modular.Linking to other-modules c178ef7
@edsko edsko Compatibility for 7.4 and 7.8
This address @23Skidoo's comment
#2500 (comment)
ff89079
Commits on Mar 28, 2015
@abhinav abhinav Update multiple `remote-repo`s in parallel.
Closes #2227
cf060d2
@abhinav abhinav Remove redundant import. 7d8a979
@edsko edsko Use the standard graph construction code
I don't know why we we constructed this graph manually here rather than calling
`graphFromEdges`; it doesn't really matter except that we will want to change
the structure of this graph somewhat once we have more fine-grained
dependencies, and then the manual construction becomes a bit more painful;
easier to use the standard construction.
ac47cbc
@lspitzner lspitzner commandline-documentation: Add note for "running" tests 7e9f4ba
@abhinav abhinav Adjust message for `cabal update` with multiple remote-repos f9d9252
@23Skidoo 23Skidoo Merge pull request #2503 from abhinav/parallel-update
Update multiple remote-repos in parallel
fe880b9
Commits on Mar 29, 2015
@ian-ross ian-ross Allow preprocessors to specify extra C sources
Add functionality to allow preprocessors like hsc2hs and C2HS to inform
Cabal of extra C sources that they create that need to be compiled and
linked.  Includes hsc2hs-based test case.
a30b11f
@23Skidoo 23Skidoo Merge pull request #2467 from ian-ross/preprocessor-extra-sources
Allow preprocessors to specify extra C sources
010093c
@lspitzner lspitzner Add warning when running invalid component (see #2507) 6796613
@lspitzner lspitzner Refactor splitRunArgs for readability ba97e0f
Commits on Mar 30, 2015
@strake strake add uploadPasswordCmd dbb4602
@edsko edsko Code layout
This commit does nothing but rearrange the Modular.Dependency module into a
number of separate sections, so that's a bit clearer to see what's what. No
actual code changes here whatsoever.
c2c73da
@23Skidoo 23Skidoo Merge pull request #2506 from strake/uploadPasswordCmd
add uploadPasswordCmd to read hackage password from arbitrary program output
5413af5
Commits on Mar 31, 2015
@23Skidoo 23Skidoo Style tweak: s/maybe (return ())/traverse_/. d74534d
@23Skidoo 23Skidoo 80-col violations. 824f7f3
@edsko edsko Introduce ComponentDeps
The ComponentDeps datatype will give us fine-grained information about the
dependencies of a package's components.  This commit just introduces the
datatype, we don't use it anywhere yet.
6019667
@edsko edsko Fine-grained dependencies in solver input
The modular solver has its own representation for a package (PInfo). In this
commit we modify PInfo to keep track of the different kinds of dependencies.

This is a bit intricate because the solver also regards top-level goals as
dependencies, but of course those dependencies are not part of any 'component'
as such, unlike "real" dependencies. We model this by adding a type parameter
to FlaggedDeps and go which indicates whether or not we have component
information; crucially, underneath flag choices we _always_ have component
information available.

Consequently, the modular solver itself will not make use of the ComponentDeps
datatype (but only using the Component type, classifying components); we will
use ComponentDeps when we translate out of the results from the modular solver
into cabal-install's main datatypes.

We don't yet _return_ fine-grained dependencies from the solver; this will be
the subject of the next commit.
a5a823d
@edsko edsko Fine-grained dependencies in solver output
In this commit we modify the _output_ of the modular solver (CP, the modular's
solver internal version of ConfiguredPackage) to have fine-grained dependency.
This doesn't yet modify the rest of cabal-install, so once we translate from CP
to ConfiguredPackage we still lose the distinctions between different kinds of
dependencies; this will be the topic of the next commit.

In the modular solver (and elsewhere) we use Data.Graph to represent the
dependency graph (and the reverse dependency graph). However, now that we have
more fine-grained dependencies, we really want an _edge-labeled_ graph, which
unfortunately it not available in the `containers` package. Therefore I've
written a very simple wrapper around Data.Graph that supports edge labels; we
don't need many fancy graph algorithms, and can still use Data.Graph on these
edged graphs when we want (by calling them on the underlying unlabeled graph),
so adding a dependency on `fgl` does not seem worth it.
6b77ea2
@edsko edsko Keep fine-grained deps after solver
The crucial change in this commit is the change to PackageFixedDeps to return a
ComponentDeps structure, rather than a flat list of dependencies, as long with
corresponding changes in ConfiguredPackage and ReadyPackage to accomodate this.

We don't actually take _advantage_ of these more fine-grained dependencies yet;
any use of

    depends

is now a use of

   CD.flatDeps . depends

but we will :)

Note that I have not updated the top-down solver, so in the output of the
top-down solver we cheat and pretend that all dependencies are library
dependencies.
87a79be
@lspitzner lspitzner Refactor splitRunArgs some more 9d9fdad
Commits on Apr 01, 2015
@23Skidoo 23Skidoo Merge pull request #2510 from lspitzner/runcomponent
Additional warnings for 'cabal run'
c940d16
@23Skidoo 23Skidoo 80-col violations. 7988b63
@23Skidoo 23Skidoo Small tweaks. a4a414e
@23Skidoo 23Skidoo Fix bash completion for sandbox subcommands.
Fixes #2513.
0fef5b4
Commits on Apr 02, 2015
@23Skidoo 23Skidoo Update changelog 4517f3e
@23Skidoo 23Skidoo Update changelog 8d1cc52
Commits on Apr 03, 2015
@anton-dessiatov anton-dessiatov Added nub function call to reduce the length of hsc2hs command line s…
…tring in case of repeating arguments.
78e7923
@anton-dessiatov anton-dessiatov Replaced nub with ordNubRight and added a link to pull request in com…
…ment.
44c04f9
@23Skidoo 23Skidoo Merge pull request #2516 from anton-dessiatov/master
Eliminate duplicate hsc2hs command line arguments
f5020d4
Commits on Apr 04, 2015
@hdgarrood hdgarrood Fix a redundant constraint
This appears to cause CI jobs on GHC head to fail; I guess GHC is now
issuing warnings for redundant constraints.

See https://travis-ci.org/haskell/cabal/jobs/57191163 for example.
5f2c62c
@23Skidoo 23Skidoo Merge pull request #2523 from hdgarrood/fix-redundant-constraint
Fix a redundant constraint
5574dff
Commits on Apr 05, 2015
@ttuegel ttuegel Merge pull request #2347 from lspitzner/hacking-doc
Fix HACKING.md description of how to run tests
6de8843
@23Skidoo 23Skidoo filterConfigureFlags: filter more flags. 94c5860
Commits on Apr 06, 2015
@edsko edsko Allow for dups in configuredPackageProblems f88c9b6
@edsko edsko Add ComponentSetup to ComponentDeps
Although we don't use the new setup dependency component anywhere yet, I've
replaced all uses of CD.flatDeps with CD.nonSetupDeps. This means that when we
do introduce the setup dependencies, all code in Cabal will still use all
dependencies except the setup dependencies, just like now. In other words,
using the setup dependencies in some places would be a conscious decision; the
default is that we leave the behaviour unchanged.
1effd34
@dcoutts dcoutts Extend .cabal format with a custom-setup section
This patch adds it to the package description types and to the parser.
There is a new custom setup section which contains the setup script's
dependencies. Also add some sanity checks.
1cfec90
@edsko edsko Add setup dependenices to modular solver's input
(and, therefore, also to the modular solver's output)
e6a88ea
@edsko edsko Treat setup dependencies as independent (always) d78cfec
@edsko edsko Add "defer setup choices" heuristic.
By chosing setup dependencies after regular dependencies we get more
opportunities for linking setup dependencies against regular dependencies.
afeb48f
@edsko edsko Take setup deps into account in plan validation e733f53
@edsko edsko Unit tests for setup dependencies a721fbf
@edsko edsko Actually _use_ setup deps in configure and co
The only problematic thing is that when we call `cabal clean` or `cabal
haddock` (and possibly others), _without_ first having called `configure`, we
attempt to build the setup script without calling the solver at all. This means
that if you do, say,

    cabal configure
    cabal clean
    cabal clean

for a package with a custom setup script that really needs setup dependencies
(for instance, because there are two versions of Cabal in the global package DB
and the setup script needs the _older_ one), then first call to `clean` will
succeed, but the second call will fail because we will try to build the setup
script without the solver and that will fail.
ba317c2
Commits on Apr 07, 2015
@edsko edsko Abstract out qualification of goals
This happened independently in a number of places, which was bad; and was about
to get worse with the base 3/4 thing.
21b6b2b
@edsko edsko Better implementation of qualifyDeps
Never consider flag choices as independent from their package.
e8cf0ac
@edsko edsko Treat base special in goal qualification 1ce1307
@edsko edsko Only qualify base if a base shim is present 390f837
@edsko edsko Unit tests for dealing with base shims 72e2ea1
@edsko edsko Make the modular solver the default always
(previously the default was the topdown solver for GHC < 7). Also adds a
deprecation warning when the topdown solver is selected.
17bba08
@cdepillabout cdepillabout Changed Main.hs to output "Hello, Haskell!" instead of "Hello, World!". 74258ca
@freizl freizl Correct the link - package version policy. e8b2ec3
@23Skidoo 23Skidoo Merge pull request #2528 from freizl/master
Correct the link - package version policy.
3644f30
Commits on Apr 13, 2015
@cheecheeo cheecheeo cabal check will fail on -fprof-auto passed as a ghc-option
This is consistent with the the current -auto-all behavior.

This fixes #2479.
f1d5252
Commits on Apr 14, 2015
@23Skidoo 23Skidoo Merge pull request #2532 from cheecheeo/2479_fprof_auto
cabal check will fail on -fprof-auto passed as a ghc-option
641e854
@mjepronk mjepronk slightly better error message in case of backjump limit reached d9c9079
Commits on Apr 15, 2015
@zadarnowski zadarnowski Fixed bash completion for sandbox subcommands 356e5ca
@23Skidoo 23Skidoo Merge pull request #2537 from zadarnowski/master
Fixed bash completion for sandbox subcommands
fdf274d
Commits on Apr 16, 2015
@23Skidoo 23Skidoo Merge pull request #2536 from mjepronk/master
Slightly better error message in case of backjump limit reached
a9c74a6
Commits on Apr 19, 2015
@freizl freizl Move SrcDirs following Main file generator. c01b5a6
Commits on Apr 20, 2015
@jtdaugherty jtdaugherty bootstrap.sh: fixes linker matching to avoid cases where tested linke…
…r names appear unexpectedly in compiler output (fixes #2542)

This fixes cases where strings like "ld" appear in compiler output on lines
that have nothing to do with the linker command invocation.
7709f1b
@23Skidoo 23Skidoo Merge pull request #2543 from GaloisInc/master
bootstrap.sh: fixes linker matching to avoid cases where tested linker names appear unexpectedly in compiler output (fixes #2542)
8a09d3e
Commits on Apr 22, 2015
@geoff-codes geoff-codes Rewrite linker check to avoid grepping "ld"s.
I was the one who introduced that bit, and it seems like well may have caused more trouble than it helped... so, sorry :(

Anyway, clang has since then grown the ability to `-print-prog-name`, so I've done away with all that grepping through -### stuff.
@creswick @23skidoo, could you see if this works for you?
fbfe6c9
@geoff-codes geoff-codes Add a missing warning guard. 17a25d2
@23Skidoo 23Skidoo Merge pull request #2550 from geoff-codes/patch-1
Rewrite linker check to avoid grepping "ld"s.
1dba5bd
Commits on Apr 23, 2015
@NathanHowell NathanHowell Add Functor, Foldable and Traversable instances to Condition 51585ae
@23Skidoo 23Skidoo Merge pull request #2551 from NathanHowell/traversable-condition
Add Functor, Foldable and Traversable instances to Condition
56b8a0f
@23Skidoo 23Skidoo Paths_ module: don't require base >= 4.
Fixes #994.
41b3c7b
Commits on Apr 24, 2015
@23Skidoo 23Skidoo Merge pull request #2552 from 23Skidoo/issue-994
Paths_ module: don't require base >= 4.
2b3a694
Commits on Apr 28, 2015
@23Skidoo 23Skidoo Revert "Revert "Print a more friendly message when http_proxy is down.""
This reverts commit c9a7735.
487f435
@23Skidoo 23Skidoo Wording. a4d55d6
@23Skidoo 23Skidoo Merge pull request #2560 from 23Skidoo/issue-1962
Print a more friendly message when http_proxy is down.
f2d01e5
@dcoutts dcoutts Force cabal upload to always use digest auth and never basic auth 3d1e7db
@23Skidoo 23Skidoo Implement a dummy 'uninstall' command.
As suggested by @sclv on reddit. See
#648 (comment)
8bfea3b
@byorgey byorgey Merge pull request #2483 from cdepillabout/cabal-install-create-main-hs
Make `cabal init` create Main.hs if it doesn't exist.
a3aa3db
Commits on Apr 29, 2015
@23Skidoo 23Skidoo Doc fix: 'cabal freeze PACKAGES' is not supported.
Fixes #2565.
c1d034b
@23Skidoo 23Skidoo Merge pull request #2567 from haskell/23Skidoo-patch-1
Doc fix: 'cabal freeze PACKAGES' is not supported.
104b38a
@23Skidoo 23Skidoo Merge pull request #2564 from 23Skidoo/uninstall-dummy
Implement a dummy 'uninstall' command.
1e208a8
@23Skidoo 23Skidoo Merge pull request #2541 from freizl/master
Move SrcDirs following Main file generator.
4fd43c1
Commits on May 01, 2015
@ezyang ezyang Document more functions in Paths_pkgname, fixes #715
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
b0c146a
@23Skidoo 23Skidoo Merge pull request #2570 from ezyang/cabal-715
Document more functions in Paths_pkgname, fixes #715
1201bc7
Commits on May 02, 2015
@23Skidoo 23Skidoo Merge pull request #2563 from dcoutts/master
Force cabal upload to always use digest auth and never basic auth
03ededf
@23Skidoo 23Skidoo -Wall police. b5f7285
@23Skidoo 23Skidoo -Wall police. 609f449
Commits on May 04, 2015
@bergmark bergmark Use PVP-compliant example when warning about missing base upper bound.
Refs hackage-server#253.
b503ba5
@23Skidoo 23Skidoo Merge pull request #2574 from bergmark/pvp-base-warning
Use PVP-compliant example when warning about missing base upper bound
725ec29
Commits on May 05, 2015
@23Skidoo 23Skidoo Implement offline mode for the 'install' command.
When in offline mode, 'cabal install' only installs packages from the local
tarball cache. Offline mode can be enabled with the '--offline' flag.

Fixes #2566.
993a008
@23Skidoo 23Skidoo Update changelog.
[ci skip]
54edd8f
Commits on May 13, 2015
@23Skidoo 23Skidoo Tweak message. 56378f1
Commits on May 14, 2015
@23Skidoo 23Skidoo Small simplifaction. 9904790
Commits on May 15, 2015
@dcoutts dcoutts Allow -Werror and similar when guarded by a manual flag
Improve the package description check for -Werror and similar flags so
that they are allowed so long as they're not enabled by default. We
check the conditions that they're guarded by to make sure they're always
false (given the default values of the manual flags). Also extend the
error messages to explain how to use these flags with conditionals.
cbfea2a
@dcoutts dcoutts Improve the -fhpc check warning message 5980710
@dcoutts dcoutts Make the -threaded flag check a build warning
The -threaded flag really makes no difference for libraries, it's a
link-time option only.
d11e2de
@dcoutts dcoutts -rtsopts and -with-rtsopts also have not effect in libraries f54fd96
@dcoutts dcoutts Fix warnings 4b0daa9
@dcoutts dcoutts Improve the -auto-all -fprof-auto warning message
And extend it to cover other similar variants. People often put it in to
help them profile *this* package, but it causes problems for profiling
other packages. The -fprof-auto-exported is arguably ok though.
fa9298c
@dcoutts dcoutts Extend ghc-options checks to ghc-prof-options
Currently there are no checks that need to be specific to one of them.
Both sets of options get used in distributed packages.
76561fb
@23Skidoo 23Skidoo Merge pull request #2594 from dcoutts/master
Improve a number of ghc-options checks
5aaad3a
@23Skidoo 23Skidoo Fix warnings. 3347edd
@dcoutts dcoutts Merge pull request #2578 from 23Skidoo/offline-mode
Implement offline mode for the 'install' command.
9e10034
Commits on May 20, 2015
@dcoutts dcoutts Handle multiple preferred-versions in the index tarball better
The existing code supports reading multiple preferred-versions files in
the 00-index.tar and merging them. However it doesn't do it quite right
when the same file is updated, it merged them instead of the later one
overriding the first.

This should make no difference right now because the 00-index.tar
typically only contains a single preferred-versions file, with no
updates.
36265fb
@qnikst qnikst Provide cabal_macros in c2hs invocation.
This commit includes cabal_macros in c2hs call, so it will
be possible to use MIN_VERSION macros in chs files.
65bbbc1
Commits on May 21, 2015
@23Skidoo 23Skidoo Merge pull request #2600 from qnikst/c2hs-cabal-macros
Provide cabal_macros in c2hs invocation.
3bb8293
@23Skidoo 23Skidoo Update changelog
[ci skip]
f03e310
@dcoutts dcoutts Merge pull request #2515 from edsko/pr/setup-deps
Introduce "setup dependencies"
d938b91
@dcoutts dcoutts Merge pull request #2530 from edsko/pr/base-shim
Add support for base shims to the modular solver
259b4e3
@dcoutts dcoutts Merge pull request #2531 from edsko/pr/switch-default
Make the modular solver the default always, and deprecate the top-down solver
4083456
@lukexi lukexi Don't recompile C files unless needed bec1f5a
@23Skidoo 23Skidoo Merge pull request #2601 from lukexi/master
Don't recompile C files unless needed
dd086a0
@23Skidoo 23Skidoo Update changelog
[ci skip]
3f52deb
@23Skidoo 23Skidoo Update changelog
[ci skip]
908b7eb
Commits on May 22, 2015
@triplepointfive triplepointfive Fix sandbox delete-source error message typo
\a is considered as a bell character, which is omitted as a result
d9f3d38
@23Skidoo 23Skidoo Merge pull request #2603 from triplepointfive/delete-source-typo
Fix sandbox delete-source error message typo
a2aaf2b
Commits on May 24, 2015
@AngusL AngusL Document 'extensions' field replacements
Resolves #2401.
3f53ee2
@23Skidoo 23Skidoo Merge pull request #2609 from AngusL/master
Document 'extensions' field replacements
49dba82
Commits on May 28, 2015
@mtolly mtolly Automatically configure when running haddock
Fixes #2275
8f4844e
Commits on May 29, 2015
@phadej phadej Implement #2366. More Condition instances 9dcb7c3
Commits on May 30, 2015
@phadej phadej Fix #2598. Omit empty CondTree branches e6bff69
@dcoutts dcoutts Merge pull request #2624 from phadej/pp-cond-tree-branches
Fix #2598. Omit empty CondTree branches
d052980
@nomeata nomeata Only set rpath on dynamic executables
not static ones. They make no sense there, increase startup time and
may violate some distributions policy on rpaths. This closes #2625.
6bea1db
@fisx fisx Support new section syntax for remote-repo. a1e6056
Commits on May 31, 2015
@fisx fisx Gardening. 48e7ce0
@fisx fisx Render remote repos into sections, not fields. 2ddcb30
@phadej phadej Fix #367. Find module files in all source directories. db754ed
@fisx fisx Empty lines between several repos. 130d67e
@phadej phadej Make cabal check warn about BOM
Implements first bullet point of #2573
c9f47d6
@phadej phadej Ignore bom when reading cabal files from index tarball 8fde866
@23Skidoo 23Skidoo Merge pull request #2626 from nomeata/master
Only set rpath on dynamic executables
776e9e2
Commits on Jun 01, 2015
@edsko edsko Explain what linking is
Addresses #2500 (comment).
44027f9
@edsko edsko Separate module for modular solver DSL
Addresses #2500 (comment).
03afe0c
@edsko edsko Introduce and use innM.
Addresses #2500 (comment).
a7ca91b
@edsko edsko Document addLinking
Addresses #2500 (comment)
Addresses #2500 (comment)
e75396b
@edsko edsko Call 'preferLinked' as the _first_ heuristic
Addresses #2500 (comment).
00bfa27
@edsko edsko Use P-setup rather P.setup for setup deps of P
(in the solver log)

Addresses #2500 (comment)
d923114
@edsko edsko Move varPI to where Var is defined.
Addresses #2500 (comment)
a44994e
@edsko edsko Add comment for LinkGroup
Addresses #2500 (comment)
fcd7a3e
@edsko edsko Remove redundant TODO 108791b
@dcoutts dcoutts Merge pull request #2621 from phadej/cabal-check-bom
Make cabal check warn about BOM
e8bcc41
@dcoutts dcoutts Merge pull request #2618 from phadej/condition-monad
Resolve #2366. More Condition instances
0390352
@edsko edsko Merge lgCanon and lgInstance
We previously recorded the canonical package and the instance of a link group
separately, but it turns out we can always record these together: when we know
one we know the other. This makes various choices a lot clearer.

Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
Addresses #2500 (comment)
bc2cf0c
@edsko edsko Add comment to dependencyInconsistencies
Addresses #2500 (comment)
ad5ff6f
@tuncer tuncer bootstrap.sh: bump versions 0b21f3e
@23Skidoo 23Skidoo Merge pull request #2634 from tuncer/bootstrap-vsn-bump
bootstrap.sh: bump versions
9d18a8a
@edsko edsko Setup dependencies are in 1.23, not 1.21.
Addresses #2515 (comment).
6c31ee0
@edsko edsko Nudge people towards using explicit setup deps
Addresses #2515 (comment)
529912e
@23Skidoo 23Skidoo Merge pull request #2635 from edsko/pr/address-remaining-solver-comments
Address remaining solver comments
72440fd
@dcoutts dcoutts Ignore tags when parsing version numbers
No change to the syntax, old tags syntax allowed but simply ignored.

Version tags have been deprecated for years and are disappearing from
the Version type in base soon.
5fd690b
@ezyang ezyang Add libname install-dirs variable, use it by default. Fixes #2437.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2cf65bf
Commits on Jun 02, 2015
@tibbe tibbe Allow using cabal program itself as the external setup method
This fixes issues when the version of Cabal that cabal-install was built
against differs from the one registered in the local package DB. Normally
we compile an external setup against the local Cabal library, which could
lead to failures or inconsistent results compared to using the internal
method.

This fixes #2438 and fixes #1938.
03b02fb
Commits on Jun 03, 2015
@dcoutts dcoutts Merge pull request #2633 from tibbe/act-as-setup
Allow using cabal program itself as the external setup method
70600e9
@dcoutts dcoutts Merge pull request #2637 from dcoutts/master
Ignore tags when parsing version numbers
7a715a1
Commits on Jun 04, 2015
@ddssff ddssff Restore the lost unit tests for version numbers
These were dropped during the migration to github.  This patch restores
them, but note that they do not all pass!
bd3e80f
@ddssff ddssff Convert old tests to tasty 4c0d862
@ddssff ddssff Add invertVersionRange and invertVersionIntervals to Distribution.Ver…
…sion, with tests
cedd81e
@ddssff ddssff Avoid use of deprecated versionTags field in invertVersionIntervals 31d2e39
Commits on Jun 06, 2015
@dcoutts dcoutts Fix a minor bug in pretty printing version ranges
Redundant parens. Was breaking one test.
1892fd6
@dcoutts dcoutts Disable failing version range tests for now
Also fix or silence build warnings
8bf62e3
@dcoutts dcoutts Merge branch 'seereason-invert-version-range' fac3d13
Commits on Jun 07, 2015
@taruti taruti Distribution.Simple.Setup: fix HaddockFlags mappend 84d6db1
Commits on Jun 08, 2015
@23Skidoo 23Skidoo Merge pull request #2649 from taruti/master
Distribution.Simple.Setup: fix HaddockFlags mappend
f89b6b6
Commits on Jun 10, 2015
@byorgey byorgey Merge pull request #2416 from lspitzner/documentation
commandline documentation
6c73028
Commits on Jun 11, 2015
@bgamari bgamari Parse C compiler flags from GHC correctly
GHC hands us a String which we previously tried to parse as a [String],
causing GHC's compiler flags to be ignored.
6b07a72
@ezyang ezyang Reduce temporary directory name length, fixes #2502
Instead of:
C:\Users\Ganesh\AppData\Local\Temp\data-default-instances-old-locale-0.0.1-11924\data-default-instances-old-locale-0.0.1
we get:
C:\Users\Ganesh\AppData\Local\Temp\data-default-instances-old-locale-0.0.1-11924

Instead of:
dist\build\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a-11924\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a
we get:
dist\build\objs-11924\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a

This should put us under the limit.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
515f879
Commits on Jun 14, 2015
@23Skidoo 23Skidoo Use 'maybe a f' instead of 'fromMaybe a . fmap f'. b64bd2e
@23Skidoo 23Skidoo Redundant import. 0c353c1
Commits on Jun 16, 2015
@eightyeight eightyeight Only warn for Setup.hs if build type isn't Simple
Because cabal sdist will add a default Setup.hs anyway
30d7735
@23Skidoo 23Skidoo Merge pull request #2657 from eightyeight/only-warn-setuphs-nonsimple…
…-builds

Only warn for missing Setup.hs if build type isn't Simple
912e8be
Commits on Jun 17, 2015
@23Skidoo 23Skidoo A fix for @ezyang's fix for #2502.
Instead of:
C:\Users\Ganesh\AppData\Local\Temp\data-default-instances-old-locale-0.0.1-11924\data-default-instances-old-locale-0.0.1
(which was the case before @ezyang's patch)
we now get:
C:\Users\Ganesh\AppData\Local\Temp\cabal-tmp-11924\data-default-instances-old-locale-0.0.1

Fixes #2658.
e4da79a
Commits on Jun 18, 2015
@dcoutts dcoutts Merge pull request #2652 from bgamari/T2292
Parse C compiler flags from GHC correctly
ea302a9
@dcoutts dcoutts Merge pull request #2615 from mtolly/master
Automatically run `configure` before `haddock`
94a83b1
Commits on Jun 19, 2015
@grayjay grayjay Test cabal exec error message in a more portable way
This change allows the tests "can run executables installed in the sandbox" and
"adds the sandbox bin directory to the PATH" to run on Windows by removing the
executable name from the required error message.
99a9611
@grayjay grayjay Compare file paths with equalFilePath for portability
Without this change, differences in filename capitalization caused "cabal
sandbox delete" to fail with this error message when used with a default
sandbox on Windows:

cabal.exe: Non-default sandbox location used:
'C:\folder\.cabal-sandbox'.
Assuming a shared sandbox. Please delete
'C:\folder\.cabal-sandbox' manually.

This commit also allows the cabal-install package tests that delete sandboxes
to run on Windows.
7c50bfe
@23Skidoo 23Skidoo Merge pull request #2666 from grayjay/cabal-sandbox-delete
Compare file paths with equalFilePath for portability
b9d1a65
@23Skidoo 23Skidoo Merge pull request #2665 from grayjay/cabal-exec-error-message-test
Test cabal exec error message in a more portable way
4e6f238
@dcoutts dcoutts Merge pull request #2630 from phadej/sdist-all-sources
Fix #367. Find module files in all source directories.
a33248d
Commits on Jun 20, 2015
@grayjay grayjay Allow cabal freeze tests to run on Windows
The tests now read cabal.config strictly so that the file is closed by the time
it is deleted for the next test.
38a46db
@23Skidoo 23Skidoo Merge pull request #2669 from grayjay/cabal-freeze-tests
Allow cabal freeze tests to run on Windows
693d176
@ezyang ezyang Change custom-setup warning to PackageDistSuspicious, partially fixes #…
…2638.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
9e9e437
Commits on Jun 22, 2015
@ezyang ezyang Drop pkgna_ prefix from package keys, c.f. http://ghc.haskell.org/tra…
…c/ghc/ticket/10550

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
c99748a
Commits on Jun 23, 2015
@snoyberg snoyberg Add a stack.yaml file
I needed this when building cabal.exe for MinGHC (see:
fpco/minghc#69). I thought others might find
this useful, especially for the use case of bootstrapping cabal
development.

I went the direction of no curation and explicit packages in the
extra-deps, as I thought that would make more sense for a project low on
the dependency chain, but this could certainly be tweaked to use LTS
Haskell or Stackage Nightly instead.
fcdfb30
@23Skidoo 23Skidoo Merge pull request #2675 from snoyberg/stack-yaml
Add a stack.yaml file
86ac418
Commits on Jun 24, 2015
@BardurArantsson BardurArantsson HACKING.md: Add quotation to sed command
The command line given to get the sandbox package database path is missing quotation which may make it fail in some shells (given certain globbing options). This adds single quotation marks to avoid such potential issues.
53f72cf
@23Skidoo 23Skidoo Merge pull request #2676 from BardurArantsson/patch-1
HACKING.md: Add quotation to sed command
3a254da
@dcoutts dcoutts Merge pull request #2671 from ezyang/cabal-drop-prefix
Drop pkgna_ prefix from package keys, c.f. http://ghc.haskell.org/tra…
03530bf
Commits on Jun 27, 2015
@ttuegel ttuegel Get 'builddir' from cabal.config or CABAL_BUILDDIR
Fixes #2484. The 'builddir' option may now be specified in cabal.config
as well. It will also be read from the CABAL_BUILDDIR environment
variable, if set. The order of precedence (highest to lowest) is:
1. --builddir command line option
2. CABAL_BUILDDIR environment variable
3. cabal.config setting
2b3282f
@ttuegel ttuegel Move lookupEnv to D.Compat.Environment c4c6e6e
@ttuegel ttuegel Don't loadConfig twice to find distPref 3bb8c7a
@dcoutts dcoutts Merge pull request #2627 from zerobuzz/security-config+1
Support new section syntax for remote-repo.
cd8f8e9
Commits on Jun 28, 2015
@DanBurton DanBurton Add test dependencies to stack.yaml 7933fe7
@23Skidoo 23Skidoo Merge pull request #2686 from DanBurton/master
Add test dependencies to stack.yaml
7c7463e
Commits on Jun 29, 2015
@dcoutts dcoutts Fix corner case where remote repo url is not specified
Will need a later check to validate the repo info, e.g. that it's a
supported url scheme and is an absolute URI.
ac093b2
@dcoutts dcoutts Add a point where we can add extra info for known repositories
This will be useful for adding crypto credentials without people having
to update their config files.

Also useful point to add any other special casing for known repos.
8617d39
@ttuegel ttuegel Fix tests when CABAL_BUILDDIR is set 2af1c1d
@ttuegel ttuegel Move D.Client.Compat.Environment into Cabal 80940e2
@ttuegel ttuegel Merge pull request #2608 from ttuegel/builddir-config-2484
Get 'builddir' from cabal.config or CABAL_BUILDDIR
589cc88
U-CIQDEV\gbazerman Implement HTTPS support using external curl, wget and powershell
Supports both uploading and downloading.
Basic built-in HTTP is still supported.
b780cc7
@dcoutts dcoutts Further work, refactoring and reformatting of new http transport code
Move utils into other Util modules.
Reformat all code to 80 cols.
Reorder code and add more comments.
Use long form style program args, e.g. --silent rather than -s
Finish implementation of form upload with wget
Fix reporting of server error messages for upload (curl & builtin)
Implement collecting of ETags for curl and wget.
Fix wget for case of 304 not modified response (wget uses exit code 8).
Rework transport configuration phase.
22f0544
@dcoutts dcoutts Change the logic for automatically upgrading to HTTPS
The initial patch would always try to use HTTPS, even when the repo
specified to use HTTP. This works for the central community hackage
but obviously does not work in general.

The new logic is that we always follow what is specified for the
remote repo in the config, except for built-in known repos (currently
just the central community hackage) where we mark them as also
supporting https. For upload when uploading to such a marked repo
then we will try https and will complain if the plain-http impl was
selected automatically (but it's ok if selected manually).

This patch also changes things so that for http urls on download, we
stick to the builtin http impl by default, and only use the external
ones if https support is required (i.e. because the repo was
configured to use an https url)
36e9e62
@dcoutts dcoutts Support https urls as targets in cabal install invocations 8a304f7
@dcoutts dcoutts Add changelog entries for new HTTPS support 4a4964a
@dcoutts dcoutts Fix warning on 7.10 57b6c49
Commits on Jul 02, 2015
@dcoutts dcoutts Merge pull request #2687 from dcoutts/gbaz-https
Merge https support
3533a59
Commits on Jul 03, 2015
@BardurArantsson BardurArantsson Warn if GHC{,JS}_PACKAGE_PATH points to non-directory 7ac9997
@dcoutts dcoutts Merge pull request #2692 from BardurArantsson/ghc-package-path
Warn if GHC{,JS}_PACKAGE_PATH points to non-directory
962004c
@fisx fisx Upgrade to zlib >=0.6.
Fix: 7.4.2 compat.

PVP compliance: upper version bound.

Revert noise and relax zlib min version back to 0.5.3 (part 1/2).

Revert noise and relax zlib min version back to 0.5.3 (part 2/2).

Test cases for maybeDecompress.

Use edsko's implementation of maybeDecompress; add test case.

Fixup.

maybeDecompress: test suite work-around.

Cleanup.

Relax zlib upper bound.

maybeDecompress: add mysteriously failing test cases.

7.4 compat for test cases.
a1ba3d0
@phadej phadej Correct maybeDecompress fd64fce
@dcoutts dcoutts Merge branch 'phadej-upgrade-zlib' 17959b8
@dcoutts dcoutts Use the version macros when building Setup.hs
The design called for allowing deps to be specified, and for the
Setup.hs to be able to use the same version macros as in other code.
This patch completes that second part.
fb7a840
@dcoutts dcoutts Merge pull request #2696 from dcoutts/master
Use the version macros when building Setup.hs
56c9c67
Commits on Jul 04, 2015
@grayjay grayjay Support pure test packages (issue #1186)
This commit relaxes D.PackageDescription.Check.checkConfiguredPackage so that it
only warns when a package declares no executables, libraries, tests, or
benchmarks.  Similarly, it relaxes the check during build to only require one
component that is buildable and enabled.  Install now requires an executable or
library.
f2f4ad4
@erikd erikd Cabal.cabal: Add missing test modules 7f7c62e
@erikd erikd cabal-install.cabal: Add missing test module 7a99d34
@erikd erikd Merge pull request #2700 from erikd/master
Add missing test modules
e88efa9
Commits on Jul 05, 2015
@phadej phadej Fix #2704
Code branch with zlib <0.6 cannot recognise the uncompressed input.
f946783
@23Skidoo 23Skidoo Merge pull request #2706 from phadej/fix-2704
Fix #2704
8da8e66
Commits on Jul 06, 2015
@phadej phadej maybeDecompress: bail on all errors at the beginning of the stream wi…
…th zlib < 0.6
ce5bb26
@23Skidoo 23Skidoo Merge pull request #2708 from phadej/issue-2704-followup
maybeDecompress: bail on all errors at the beginning of the stream with zlib < 0.6
b5e832d
@dcoutts dcoutts Merge pull request #2699 from grayjay/pure-test-packages
Support pure test packages (issue #1186)
890b78a