Skip to content


Subversion checkout URL

You can clone with
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 Feb 21, 2008
@kolmodin kolmodin Fix typo 5e64fb2
@kolmodin kolmodin When a package seems ok, say so 45ff5ee
@kolmodin kolmodin Make the qa check return an exit code reporting the status b1b7830
Commits on Feb 22, 2008
@dcoutts dcoutts Use exitFailure rather than exitWith (ExitFailure 1)
and instead of exitWith ExitSuccess just return through main rather than
throwing an exception
@dcoutts dcoutts Update for Package and various utils having moved modules
Several of the general util functions in Hackage.Utils are now in the main
Cabal lib in Distribution.Simple.Utils so we use those.
The Package class moved into Distribution.Package.
Use the packageId class function in more places.
@dcoutts dcoutts Handle unpacking failures slightly more gracefully
And note problem #246 about unpacking tar files with links
Commits on Feb 23, 2008
@dcoutts dcoutts Print output as UTF8 64141da
@dcoutts dcoutts Depend on latest Cabal lib c9f74da
Commits on Feb 24, 2008
@dcoutts dcoutts Convert to using readTextFile as appropriate
Added readBinaryFile for on use (uploading .tar.gz files)
Remove readURI as it was not being used.
Commits on Feb 25, 2008
@dcoutts dcoutts Read package descriptions from the index as UTF8 7fc668a
Commits on Feb 27, 2008
@dcoutts dcoutts Take nub by package id when making a dep graph
and give more detailed error messages for internal error conditions.
Fixes a problem where installing a set of packages where several depended
on the same package would give us a ResolvedDependency list containing
multiple copies of that package. The DepGraph was expecting unique packages.
Resolving package deps and generating install plans needs more thought
and better specified invariants.
Commits on Feb 28, 2008
@dcoutts dcoutts Revert to ordinary read/writeFile for the config file a258fb4
@kolmodin kolmodin Implement --dry-run for 'cabal install' a723329
Commits on Feb 29, 2008
@dcoutts dcoutts Add --dry-run to upgrade, replacing existing info message
Also adjust the default for --dry-run to be false rather than empty.
@dcoutts dcoutts Remove 'info' command, make --dry-run cover that feature
In -v mode info produced a detailed tree explaining the dependency
resolution. That feature has been moved into 'install --dry-run -v'.
Commits on Mar 01, 2008
@kolmodin kolmodin Improve 'cabal list'
Make the output of 'cabal list' prettier. 
$ cabal list xmonad
 * xmonad
      Latest version available: 0.6
      Latest installed version: 0.6
      Category: System
      Synopsis: A tiling window manager
      License:  BSD3
 * xmonad-contrib ...[snip]
Very much like the gentoo tools eix and esearch.
This targets part of ticket #235. It still does not show packages that are
installed but not available.
@kolmodin kolmodin Implement --installed to 'cabal list'
Adding --installed to 'cabal list' will make it print only packages that are
Commits on Mar 02, 2008
@kolmodin kolmodin Implement 'cabal list --simple-output'
Provides a output format that is easier to pass on to unix tools and other
scripting tools. Also works together with --installed.
@kolmodin kolmodin Remove shortopt -I for --installed 19d47fe
Commits on Mar 03, 2008
@dcoutts dcoutts In 'list', also include packages that are only installed and not avai…

Previously we took the available packages and did an inner join with the
installed packages so we missed out packages like base which are installed
by not available. Now we get the selected installed and available package
sets and do a full outer join using a sort and merge operation.
Also use a proper data type to hold the info we print about each package.
@dcoutts dcoutts Fix savedConfigToConfigFlags so the command line overrides the config
"cabal configure --global" was incorrectly passing the user prefix to setup.
@dcoutts dcoutts Fix fromFlag bug and use default flags for list command 4b88758
@kolmodin kolmodin CLI completion: Add completion of packages
Add completion of packages to the commands install, list, upgrade and fetch.
Only complete packages if the user is not trying to complete a flag.
Complete with package-versions if the package name ends with a dash,
otherwise just complete with the package names.
@dcoutts dcoutts Update for recent Cabal lib api and behaviour changes
Depend on latest Cabal lib version and bump our own version due to recent
feature additions and removal of the 'info' command.
@dcoutts dcoutts Instead of Setup.lhs use .hs like everyone else does 429f782
Commits on Mar 04, 2008
@kolmodin kolmodin Fix defect when unpacking tar files containing links
There were two issues;
  * Unpacking links that point to files not yet unpacked
  * Used the link target as absolute path, but it's relative
This patch addresses both issues, which is ticket #246.
There may still be errors if a link refer to another link which has not
been unpacked yet.
@byorgey byorgey Hackage/List.hs: port showPackageInfo to pretty-printing combinators,…
… improve display of packages with multi-line synopses
Commits on Mar 05, 2008
@dcoutts dcoutts Attempt to make things work using hugs, assume everything is installed f26ec48
@byorgey byorgey Hackage/List.hs: reflow paragraphs when displaying synopsis/description. e106334
Commits on Mar 06, 2008
@dcoutts dcoutts Use new buildOS and buildArch 066c09b
@Saizan Saizan Implement CLI flag --root-cmd for 'cabal install' as in #202
It also adds the internal flag --only so we can avoid building a setup when build-type == Simple.
Commits on Mar 07, 2008
@byorgey byorgey List.hs: fix synopsis paragraph wrapping 4c56a72
Commits on Mar 10, 2008
@dcoutts dcoutts Make the 'upload' command more self explanatory
It tells you what to do if you don't supply any args, rather than doing
nothing and it check for simple mistakes and gives helpful error messages.
@dcoutts dcoutts Adapt to using the bundled ReadP
+1 for using the same version of the ReadP lib everywhere,
previously we would only have noticed this type error with nhc98.
Commits on Mar 12, 2008
@dcoutts dcoutts Parse filepaths in the config file the same way as in .cabal files
That is, allow quoted and unquoted paths.
Commits on Mar 18, 2008
@Saizan Saizan FIX #40, now cabal sdist creates the archive using Hackage.Tar
we don't call setup sdist anymore but we use functions from Distribution.Simple.SrcDist
@Saizan Saizan fix imports, because Dependency has moved in Cabal d164042
Commits on Mar 19, 2008
@dcoutts dcoutts Refactor the SrcDist code in a similar way as in the Cabal lib 1c4ce5c
@dcoutts dcoutts Minor changes to the tar packing code
Use lazy bytestring when packing tar entry headers rather than strict and
then making a single chunk lazy bytestring later. The lazy bytestring pack
will only generate a single chunk for a String that short (<4k).
Use openBinaryFile rather than openFile + hSetBinaryMode.
Add a haddock module header with copyright note.
@dcoutts dcoutts Use relative paths when makeing tar.gz rather than changing current dir
The current directory is a global variable, we should not mutate it.
So instead, pass a base and relative path when generating tar entries.
Also change sanitizePath to be pure and use FilePath.Poisx.
@dcoutts dcoutts Simplify the tar code a bit more
We always know the base path for construction or extraction so don't
bother using Maybe FilePath. Also use GZip qualified.
@dcoutts dcoutts Record and report the exceptions that cause build failure
When installing a bunch of package we have to catch exceptions since
we carry on building other packages that did not depend on the
failing package. We were recording what phase the failure was in but
not the actual exception. We now record that too and print it along
with the more general explanation of what package failed and in
which phase. It's not perfect, eg when a package fails to compile we
end up printing that the exception was "ExitFailure 1" which is not
very useful.
@pepeiborra pepeiborra #223 part2: Support all the configure options in the config file
This patch takes advantage of the new OptionField structure in Distribution.Simple.Command
to provide support for all the configure command line options in the .cabal/config file.
This has a global effect on all the packages managed by cabal-install.

The ticket also mentions support for per-package sections in the config file. This patch
does not take care of that.
@dcoutts dcoutts Bump version and require latest Cabal lib version 4605c2f
Commits on Mar 20, 2008
@Saizan Saizan fix small bug in Hackage.Tar
The baseDir was passed instead of the full path.
Commits on Mar 25, 2008
@dcoutts dcoutts Use the new Text class all over
Mostly just changing showVersion, showPackageId to display instead
Commits on Mar 27, 2008
@dcoutts dcoutts Update to recent Cabal lib changes e433203
Commits on Mar 29, 2008
@dcoutts dcoutts Use new showPWarning for warnings in parsing the config file 75c8981
@dcoutts dcoutts Bump version number and depend on the latest Cabal lib d046843
@dcoutts dcoutts TAG 0.4.6 57118e2
Commits on Mar 30, 2008
Spencer Janssen Add missing modules in other-modules, fixes sdist 0557c53
Commits on Apr 12, 2008
unknown Half-done build reporting stuff 733e00d
Commits on Apr 13, 2008
@dcoutts dcoutts Update for change to finalizePackageDescription 6c61d79
@dcoutts dcoutts Relax version constraint on HTTP, seems to work with 3001.1 2fba4c5
@dcoutts dcoutts Make ResolvedDependency an internal detail of dependency calculation
Externally we currently use a DepGraph, though we'll move to a InstallPlan.
This is a step towards making it easier to swap in different package
dependency resolution algorithms. Because we're hiding ResolvedDependency
we have to disable the extended Hackage.Info stuff for the moment.
Commits on Apr 14, 2008
@dcoutts dcoutts Change resolveDependencies to take OS and Arch as parameters
Rather than using global 'constants' for the current os and arch.
@dcoutts dcoutts Simplify install --only implementation
The install --only doesn't do any planning or build
reporting so make it completely separate so we do
not have to make up fake build plans or results.
@dcoutts dcoutts Add new InstallPlan type
This is joint work with Kolmodin.
An InstallPlan records what we want to install and records the outcome
of installing packages. It has a fairly strict internal invariant which
should guarantee that each package can be configured sucessfully.
Commits on Apr 20, 2008
@dcoutts dcoutts Update for FlagAssignment changes d82dcb8
Commits on Apr 23, 2008
@dcoutts dcoutts Update for checkPackage change 286c9d9
Commits on Apr 24, 2008
@dcoutts dcoutts Rearange install plan checking code
Make it usable for callers that want to check
properties before constructing an InstallPlan.
Commits on Apr 30, 2008
@dcoutts dcoutts Make the default SavedConfig contain empty rather than default Config…

We do not want to pass a load of default command line flags. We only want
to pass flags where we're overriding the defaults.
Also it's because old Cabal versions do not understand new flags.
@dcoutts dcoutts Simplify the way we derive configure, install and upgrade commands
so we do not accidentally inherit the default flags for the underlying
configure command when we in fact want the empty flags. I am beginning
to suspect that having any defaults at all was a mistake.
@dcoutts dcoutts Add replacement SetupWrapper module
Clearer code and a wider interface to give more control.
@dcoutts dcoutts Fix setupWrapper bug, when no compiler was configured bca6875
@dcoutts dcoutts Convert Main to use the new SetupWrapper module f1d9b86
@dcoutts dcoutts Add a new --cabal-lib-version flag to the install command
It's used to select which version of the Cabal lib to use when
configuring, building and installing packages. It's mainly so that
we can use cabal-install to help us test that packages build ok with
both old and new versions of the Cabal library. In particular we'd
like to check every package on hackage to make sure that new Cabal
versions are not breaking packages that worked with older versions.
@dcoutts dcoutts Convert the Install module to use the new SetupWrapper
And refactor slightly to batch some of the misc parameters
together in a record rather than passing them all separately.
@dcoutts dcoutts Generalise and rename PkgInfo to include local packages
Renamed to AvailablePackage since that what it is really.
Now instead of just representing packages from a remote hackage repo
it includes an alternative for a local unpacked package. In future
we should add more alternatives, eg for other local packages (ie not
just the one that's unpacked in the current dir) and for remote
packages in source control like darcs, git etc.
@dcoutts dcoutts Remove the resolveDependenciesLocal, implement it via resolveDependen…

The local variant was for the case that we were starting from a package
description rather than a dependency to a named package. In the local
case we not only need to resolve the dependencies of the package but also
to find a flag assignment for the local package. This case crops up in
the resolver normally when we try to satisfy a dependency, we have to
pick a flag assignment for the dependency and resolve its dependencies.
It is annoying to have both entry points, especially as we want the
resolver to be plugable. So instead we define the local package as an
available package, then by resolving a single dependency on exactly the
name and version of the local package then we can get an install plan for
the local package. It also requires generalising installPkg to deal with
the local case.
Commits on May 01, 2008
@dcoutts dcoutts Don't echo when prompting for the hackage upload password.
Fixes ticket #268. And use newtypes for the username and password,
just to be more sure we're not mixing them up with other strings.
Commits on May 04, 2008
@dcoutts dcoutts Update for flipped order of args for PackageIndex.insert cf360f5
@dcoutts dcoutts Add new utils, duplicates, duplicatesBy and mergeBy da50845
@dcoutts dcoutts Use the mergeBy from the Utils module 265ac95
@dcoutts dcoutts Improve InstallPlan error checking and reporting
Instead of just reporting that a plan is invalid, produce a
detailed list of reasons why it is invalid.
This should be useful for people debugging dependency resolvers.
Also rename the complete property to closed, since the property
is about the set being closed under the dependency relation.
Also re-use the PackageIndex functions for checking the validity
conditions rather than re-implementing the checks locally.
Commits on May 05, 2008
@dcoutts dcoutts Packages are only invalid if they have more than zero problems. 11045f3
@dcoutts dcoutts Switch from DepGraph to InstallPlan
The dependency resolver has had to be extended in a slightly hacky
way to gather the extra information needed by an install plan. In
particular it requires the flags to use to configure each package,
the actual versions of dependencies to use and all of the
installed packages and their closure of dependencies.
However the current resolver is fairly naive and so can be easily
persuaded into producing an invalid install plan, in which case
you'll get a detailed list of reasons as to why it is invalid.
Commits on May 06, 2008
@dcoutts dcoutts Add more info and debug messages at key parts of the install process
If we're in verbose mode then always print what we're going to
install, not just when the user specifies --dry-run.
@dcoutts dcoutts Hide the installed instance when installing the local package.
Otherwise the dependency resolver may decide to pick the installed
instance of the package but we really do want to install the local
version. So to remove that choice from the dep resolver we just
delete it from the installed package index.
@dcoutts dcoutts Minor improvements to InstallPlan documentation and error reporting c32d24b
Commits on May 07, 2008
@dcoutts dcoutts Check that InstallPlan dependencies respect a state relation
For example it's not allowed for installed packages to depend
on configured packages.
@dcoutts dcoutts Add a dependency graph to the InstallPlan
Uses Data.Graph and annoyingly we also need to keep functions
around for mapping between Graph.Vertex <-> PackageIdentifier
@dcoutts dcoutts Add lookupConfiguredPackage helper function to InstallPlan
Simplifies implementation of completed and failed
@dcoutts dcoutts Reimplement InstallPlan.failed as it was completely wrong
It was finding all the dependencies of the failed package and
marking them as failed. But of course what we have to do is find
all the packages that depend on the failed package (the reverse
dependencies) and mark them as failed. We use the reverse
dependency Graph that we saved in the InstallPlan.
@dcoutts dcoutts Add an info message when resolving dependencies
It can take a while, especially with debug checks turned on.
@dcoutts dcoutts Hide broken installed packages when resolving dependencies
Stops us from choosing them which would always end up with an
invalid installation plan.
@dcoutts dcoutts Move ConfiguredPackage type into Types module
It's not actually specific to the InstallPlan.
@dcoutts dcoutts Refactor installLocalPackage and installRepoPackages
They share most code so pull the first and last bits out into the
top level install function. They now need 2 and 3 fewer params
respectively, which is a good sign. Rename them because they're
generating plans now rather than doing the installation directly.
@dcoutts dcoutts Tidy planLocalPackage and planRepoPackages a bit more 6201bdb
@dcoutts dcoutts executeInstallPlan now takes an installer instead of calling installPkg
Four of the executeInstallPlan param were just passed through directly
to installPkg so this decouples them a bit.
Commits on May 08, 2008
@dcoutts dcoutts Restructure the package installing code
Previously each layer called the next layer down and therefore the
top layer had to take all of the params that the bottom layer needed
even though they were mostly or wholly unmodified on the way down.
Now each layer takes the next layer as a parameter so we do not need
to take the params that are not used directly by the current layer.
The overall stack is then built by applying each layer to the next.
Commits on May 09, 2008
@dcoutts dcoutts Change InstallPlan.done and .next into .ready that returns a list
So kind of like uncons style rather than null and head.
It returns all the ready ones by lazily so it's no extra expense.
It'll allow parallel installations since all ready packages are
independent of each other. Also update callers.
@dcoutts dcoutts Change the result type of DependencyResolver
and add a wrapper that makes InstallPlans
@dcoutts dcoutts Make the existing dep resolvers to use the DependencyResolver interface
That is the standard naive dep resolver and the bogus one that has to
make up a plan assuming that all dependencies are installed.
@dcoutts dcoutts Swap Either args so it's Either Error Ok
Which seems to be the normal convention.
@dcoutts dcoutts Split the two resolvers out of the Dependency module
It's clearer what is the generic stuff and what is specific to the
current resolver. So it should be a bit easier to swap in new ones.
@dcoutts dcoutts Put the check back in for hideBrokenPackages bebd7ed
Commits on May 10, 2008
@dcoutts dcoutts Rewrite getUpgradableDeps so it's simpler and linear time
Also change so that instead of giving the available package with
the highest version number (where that is higher than the installed
package) it gives us a dependency on a version of the package that
is strictly greater than the one installed. This is more flexible
since when resolving we do not necessarily have to pick the very
latest version if that turns out not to be possible.
@dcoutts dcoutts Move dryRun out of the misc options b7dbaeb
@dcoutts dcoutts Move printing of build failures into a separate function 9f4c73d
@dcoutts dcoutts Pull the planners out of install and pass them as parameters b2f4f98
@dcoutts dcoutts Move the upgrade action into the Install module
It shares most code anyway.
Also fixes ticket #260 becuase we use the right entry point now.
Commits on May 12, 2008
@dcoutts dcoutts Update for distPref changes a349311
Commits on May 16, 2008
@dcoutts dcoutts Update for renamed PackageIndex.delete (now .deletePackageId) 5b4cd32
Commits on May 21, 2008
@dcoutts dcoutts Remove the silly failing resolver demo c31cbe1
@dcoutts dcoutts Hide any available base and ghc-prim packages from the dep resolver
Previously if the base package was available on hackage then the dep
resolver might try to upgrade it. Unfortunately that's almost
certainly technically impossible at the moment. So now since the dep
resolver does not see these available packages it cannot pick them.
This should fix ticket #174.
Commits on May 28, 2008
@dcoutts dcoutts Move common dependency resolver types into shared module ba4929b
@dcoutts dcoutts First version of the top-down package dependency resolver
This is a new dependency resolver that produces valid install plans.
It works in polynomial time however because the search space is 
exponential in size it is not guaranteed to find a solution even if
one exists. It works by generating and then exploring the search
space represented as a lazy tree. It uses constraints to prune
choices and heuristics when guesses are necessary. Currently it can
generate install plans for 99% of the packages on hackage. The
remaining 6 packages should be doable with two extra tricks.
It is not finished and is not yet usable in practice.
Commits on May 29, 2008
@dcoutts dcoutts Bump version and depend on the latest Cabal from the 1.4 branch 5b36095
@dcoutts dcoutts Use thisPackageVersion and notThisPackageVersion from Distribution.Pa…

rather than the local definitions
@dcoutts dcoutts Switch DependencyResolver to return Progress and String errors
rather than Either and structured error type [Dependency]. The reason
we cannot use that as a structured error type any more is because
missing dependencies is not the only failure reason. There are
several reasons, several of which are pretty complex. For now we'll
have to do with a human readable message. Perhaps we may be able to
find a common structured type that the different dep resolvers can
all agree on. I'm not hopeful however as error reporting seems to be
closely tied to the dep resolution approach.
Commits on May 30, 2008
@dcoutts dcoutts Add resolveDependenciesWithProgress
nd clean up header info
@dcoutts dcoutts Switch install to use resolveDependenciesWithProgress
And show progress messages at verbosity level 2.
@dcoutts dcoutts Rearrange and tidy bits of the topdown resolver 7d078df
@dcoutts dcoutts As a heuristic, use topological order for the order of package choices
The general case in exploring the state space is that we have a set of
choices (package names) and for each choice we have a number of
versions of that package we could pick. If there's only one version of
a package then we make that choice first. Otherwise we have to pick
some package and select one of the available versions. The question is
which package should we make a choice for first? Previously we picked
completely arbitrarily. Surprisingly this actually works pretty well.
An improvement is to pick packages in topological order. This works
better because it allows dependencies from earlier choices to
constrain our later choices.
Commits on Jun 02, 2008
@dcoutts dcoutts Implement plan improvement
The idea is to improve the plan by swapping a configured package for
an equivalent installed one. For a particular package the condition
is that the package be in a configured state, that a the same version
be already installed with the exact same dependencies and all the
packages in the plan that it depends on are in the installed state.
@Saizan Saizan Fix bug in passing the verbosity value when re-executing cabal
It was passing the value as another argument, distinct from the flag.
@dcoutts dcoutts Support top level dependency version constraints
and error messages for when they're unsatisfiable or conflict
@dcoutts dcoutts Fix improvePlan so the index is updated incrementally
It's important since later packages can depend on earlier ones having
been changed from configured to pre-existing. That is afterall the
whole point of considering them in reverse toplogical order.
Also, remove duplicates in the dependencies list of installed
packages since ghc-pkg does not currently prevent duplicates in (eg
multiple depends on the same version of base). See ghc bug #2230.
@dcoutts dcoutts Change the DependencyResolver type to take a per-package version pref
And add a few global package version pref policies and use them in
ordinary install and upgrade. For install we use a policy that says
that we prefer the latest version of a package that we specifically
request and prefer the installed version of any other package. For
upgrade we simple always prefer the latest version. One can imageine
other policies where we prefer the latest version for only some
interesting subset of packages and installed otherwise.
No resolvers actually make use of this preference yet.
@dcoutts dcoutts Make use of the package version preference in the top-down resolver 181bce1
Commits on Jun 03, 2008
@dcoutts dcoutts Make the 'upgrade' command take optional deps
Up to now 'upgrade' took no args and tried to upgrade all installed
packages to the latest versions. It retains that mode but also has
a new mode rather like 'cabal install'. The difference is that with
$ cabal install foo
it means install latest version of foo but otherwise prefer the
installed versions of deps of foo, while
$ cabal upgrade foo
means install the latest version of foo and also the latest
versions of all the dependencies of foo.
@dcoutts dcoutts Switch the defaultResolver to the new topDownResolver
Time for wider testing.
@dcoutts dcoutts Bump version number to help with bug reports
The new resolver is a significant change in behavior so it's
useful to know when people report problems.
@dcoutts dcoutts Don't include the default repo when loading the config file
So we don't end up downloading the index from hackage twice.
@dcoutts dcoutts Check the InstallPlan invariant on updates and not on reads b4f78d3
@dcoutts dcoutts Update the README file 743181b
@dcoutts dcoutts Remove obsolete TODO 7e2d704
@dcoutts dcoutts Update copyright dates and holders in LICENSE file 4541530
@dcoutts dcoutts Update synopsis and description e6bab63
Commits on Jun 04, 2008
@dcoutts dcoutts Turn on assertion checking even in -O builds
Although it is expensive, we want to catch problems early.
@dcoutts dcoutts Failed packages can still depend on configured packages
This is because a package can depend on several packages and if one
of the deps fail then it fails but it still depend on the others
that did not fail. This fixes an assertion failure in larger builds.
@dcoutts dcoutts Fix for marking reverse deps of failed packages
The reverse deps may have already failed due to depending on another
failed package. So do not assume all reverse deps are in the
configured state. If they are in the failed state then ignore them.
Commits on Jun 05, 2008
@dcoutts dcoutts When marking failed reverse deps, don't include the package itself
Otherwise we end up saying packages failed because they depend
on themselves which failed to install, which is silly.
Commits on Jun 06, 2008
@dcoutts dcoutts Rearrange setup wrapper to know the cabal lib version
It is important to know which version of the Cabal lib the setup
script has been built with because it affects what flags we can pass
to it. So we now store the version in dist/setup/setup.version.
If the version number changes then we rebuild the setup binary.
@dcoutts dcoutts Filter the configure flags based on the Cabal lib version
Allows us to use cabal-install to build packages where we build the
Setup.hs script using an older version of the Cabal library.
This is important for packages that claim to need an older version
and it's also pretty useful for testing.
@dcoutts dcoutts Adapt to changes in Cabal library 1.4 branch 7d50938
@dcoutts dcoutts Fix haddock markup 26224a6
@dcoutts dcoutts trivial doc improvement and unused name fix 5366a8d
@dcoutts dcoutts Bring the reporting module slightly closer to reality 8c49419
@dcoutts dcoutts Bump version number 65e9644
@dcoutts dcoutts Add Hackage.Reporting to other-modules 77d120b
@dcoutts dcoutts TAG 0.4.9 be871e9
Commits on Jun 07, 2008
@dcoutts dcoutts Only inspect the needed parts of the installed and available indexes
The available package index is loaded lazily so if we can avoid
forcing all the packages then we can save a huge amount of slow text
parsing. So select out the maximal subset of the index that we could
ever need based on the names of the packages we want to install. For
the common case of installing just one or two packages this cuts
down the number of packages we look at by a couple orders of
magnitude. This does not help with the installed index which is read
strictly, though most people do not (yet) have hundreds of installed
packages, so that's less of an immediate problem.
@dcoutts dcoutts Use a smarter preference when picking a Cabal lib to build Setup.hs
Instead of just using the latest version we use the best version
according to the following preferences in priority order:
- the same version as cabal-install was itself built with
- the same major version number as cabal-install was built with
- a stable version of Cabal (even second digit of major number)
- the latest version
Commits on Jun 08, 2008
@dcoutts dcoutts First cut at generating build reports 2b7af78
@dcoutts dcoutts Use proper URI type rather than String 905fdd0
@dcoutts dcoutts Include the hackage server in the build report
This is so that we remember which server to send the reports to.
This is pretty important if you're using a private as well as a
public hackage server.
Commits on Jun 09, 2008
@dcoutts dcoutts Use a readable external formar for build reports 4ed1981
Commits on Jun 10, 2008
@dcoutts dcoutts Fix parsing of build reports
and add a function to parse a whole logfile of reports
@dcoutts dcoutts Put build-reports into per-server dirs
Don't bother putting the server url into each report
since we do not want to upload that information anyway.
@dcoutts dcoutts Fix printing of flags in build reports 074ac9e
@dcoutts dcoutts Put the build client it into the build reports 7b7a808
@dcoutts dcoutts Put the configurations flags into each UnresolvedDependency
We don't actually have per-package flags yet. All -f flags
on the install/upgrade command line apply to every paclage.
@dcoutts dcoutts Take the the flag assignment into account in the resolver
so it now actually works to say: $ cabal install foo -fbar
Commits on Jun 12, 2008
@dcoutts dcoutts Put upper bounds on all the build-depends 3a0c26c
@dcoutts dcoutts Update to minor change in Cabal-1.4 and fix a warning. d4bf39a
@dcoutts dcoutts Include the bash-completion code in the tarball 1636e97
@dcoutts dcoutts Bump the version to 0.5.0 bbbf1d7
@dcoutts dcoutts TAG 0.5.0 e62c513
Commits on Jun 13, 2008
@dcoutts dcoutts The update command doesn't take any extra args 0f37a4b
Commits on Jun 16, 2008
@dcoutts dcoutts Try and pick up the http proxy on windows correctly
Takes account of the ProxyEnabled reg key
Allow proxy uris that lack the http:// uri schema.
This should really be moved into the HTTP package.
@dcoutts dcoutts Move getAvailablePackages into IndexUtils module 2d0b76e
@dcoutts dcoutts Use standard thisPackageVersion rather than inlined definition 8d5b92f
@dcoutts dcoutts Overhaul the bogus dependency resolver so it works again
The bogusResolver is used for compilers like hugs and nhc98 where
we do not know what packages are already installed. We do it by
altering the descriptions of the packages we're going to install
to remove all of their dependencies. Doing this gives us a valid
install plan. We rely on hope to minimise the difference between
this install plan and reality.
@dcoutts dcoutts Default to global installs on Windows
User installs by default elsewhere. Note that this default only
affects new config files. Existing windows users will need to
change their config file or delete it and let it be re-created.
Commits on Jun 17, 2008
@dcoutts dcoutts Bump the version to 0.5.1 1c2d3d1
@dcoutts dcoutts TAG 0.5.1 0b5a44d
Commits on Jun 18, 2008
@dcoutts dcoutts Fix the upload command message about the location of the config file deb9db0
Commits on Jun 19, 2008
@dcoutts dcoutts Add initial build logging, based on reporting code 8868c29
Commits on Jun 23, 2008
@dcoutts dcoutts Fix for when user supplies incorrect upload username/passwd
Should now return a proper error rather than an internal
error from the HTTP library.
Commits on Jul 25, 2008
@gwern gwern cabal-install.cabal: fix build-from-sdist failure 4951143
Commits on Jul 30, 2008
@dcoutts dcoutts Move modules under Distribution.Client
And tidy some imports slightly
@dcoutts dcoutts Add support to SetupWrapper for logging setup output to a handle
or for using a diiferent initial working directory. We already
need to use a different working dir and this would allow us to
spawn multiple setup processes for parallel builds each with
their own working dir. Also, we want to be able to capture the
output of builds. At the moment our internal logging framework
is not capable of redirecting, but if we launch a process we
redirect its output to a file. This should be useful for build
reporting where we want logs for each individual package.
@dcoutts dcoutts Move the install command options so they're not toplevel decls
Except for optionDryRun which is shared with another command.
@dcoutts dcoutts Use the external setup method when logging the output
For the internal method, change to the right working dir if necessary.
@dcoutts dcoutts Use the setupWrapper useWorkingDir feature in Install
Rather than calling inDir directly.
@dcoutts dcoutts When launching setup in another dir we must use an adjusted path
The path to the binary we're running must be accessable from
that other directory. The fix is to use currentDir </> setup
@dcoutts dcoutts Make the upgrade command take all the install command flags d9cce45
@dcoutts dcoutts Add install --log-builds flag
Eg can use cabal install foo --log-builds='$pkgid-$compiler.log'
and the build log for each package will written to a separate
file. If an existing file is given then the log is appended.
This or something like it should help in future with build
reporting of the non-anonymous kind.
Commits on Aug 02, 2008
@dcoutts dcoutts Remove the unused module Distribution.Client.Clean ae2fa8e
@dcoutts dcoutts Fix changing working dir when calling external setup but not logging
Now uses a single code path for both modes.
@dcoutts dcoutts Pass dist dir and verbosity flags to build and install phases b558cc3
@dcoutts dcoutts Add feature to symlink binaries into another dir
This covers the major part of ticket #289.
@dcoutts dcoutts Add a symlink-bindir field to the config file
and link it up with the symlink feature code.
@dcoutts dcoutts Bump minor version number 3f2e151
@dcoutts dcoutts Fix generating haddock docs 41214fd
@dcoutts dcoutts Warn about symlinks that could not be created 2a6d52c
@dcoutts dcoutts Add a LocalRepo kind of Repo and refactor the Fetch code
This is the groundwork needed to support local repositories,
that is ones acessable via the local filesystem and without
a corresponding download cache. They use the same format/layout
as the download cache of a remote repo.
Commits on Aug 03, 2008
@dcoutts dcoutts Use the given working dir when preparing to call setup
I introduced a subtle bug with paths when I stopped using inDir
outside of setupWrapper. It was using the current dir to find
Setup.hs rather than the target dir. That ofen works because
there's a Setup.hs in the local dir. I think it's now fixed to
always use paths relative to workingDir. As before, it invokes
the setup binary giving it the new working dir.
Commits on Aug 05, 2008
@dcoutts dcoutts Refactor BuildResult type and related types
Split BuildResult into Either BuildFailure BuildSuccess
Make BuildSuccess contain info for docs and tests.
Make PlanPackage use BuildSuccess and BuildFailure directly
rather than being parameterised by any build result type.
This has a knock on effect on lots of other types which
were parameterised just because PlanPackage was.
@dcoutts dcoutts Initial support for building haddock docs
No flag to turn it on/off yet.
Commits on Aug 06, 2008
@dcoutts dcoutts Shrink the size of the ParseUtils module
Really it should be eleminated entirely.
@dcoutts dcoutts Remove showFields
use the pre-existing ppFields
@dcoutts dcoutts Use a local copy of the new parseFields from Cabal lib
We can remove the local copy once we switch to the next
Cabal version. In the mean time, the code is at least sane
and consistent between libs.
@dcoutts dcoutts Don't require config file fields to have "" for empty values
And make the parsing slightly nicer.
@dcoutts dcoutts Rearrange the symlinking code slightly
Will make it easier to create the bin dir, if that's what we want to do.
@dcoutts dcoutts Ignore local files when compiling Setup.hs c4f4081
@dcoutts dcoutts Add --enable/disable-documentation flag.
This addresses most of ticket #206.
Commits on Aug 07, 2008
@dcoutts dcoutts Rearrange the BuildReport code dfeab5c
@Lemmih Lemmih Simple upload support for build reports. fb021e3
@dcoutts dcoutts Fix up other-modules list 5c757ca
@dcoutts dcoutts Fix BuildReport parser 69e7ef5
Commits on Aug 08, 2008
@dcoutts dcoutts Add defaultLogsDir util and use it for storing build reports ed978fc
@dcoutts dcoutts Add --build-reports install flag 00bb6d4
@dcoutts dcoutts Implement --build-reports flag df8e634
@dcoutts dcoutts Add command line UI for 'report' action. 76499cb
@dcoutts dcoutts Add verbosity flag to report command b99939e
@Lemmih Lemmih Store detailed build logs. 9e82124
@Lemmih Lemmih First stab at uploading the detailed logs. 4d5d1c6
@dcoutts dcoutts Create the logs dir 9905fb1
@dcoutts dcoutts Fix the urls for the new hackage server 966af5b
@Lemmih Lemmih Only look at .log files. 5db611b
@Lemmih Lemmih Use correct uri to /buildreports a4e2466
@Lemmih Lemmih silly types. 9aa31c9
Commits on Aug 10, 2008
@Lemmih Lemmih Support legacy download and upload urls. 64c37e9
@Lemmih Lemmih Print upload error messages if they are in text/plain. 7bda173
@dcoutts dcoutts Remove most warnings from BuildReports.Upload module 63e952d
Commits on Aug 12, 2008
@dcoutts dcoutts Use a more specific type in one place in SetupWrapper
It doesn't need access to the whole Packagedescription,
it only needs the the PackageIdentifier.
@dcoutts dcoutts Regig install pipeline, pass the PackageDescription
Rather than the GenericPackageDescription.
@dcoutts dcoutts Fix building on Windows
I hateses #ifdefs
@dcoutts dcoutts Add missing module to other-modules 9bc2a78
@dcoutts dcoutts Clean up some warnings 2428f90
@dcoutts dcoutts Allow cabal-install to re-install itself on Windows
This is a fairly heavyweight solution, but then it's quite
a nasty problem. What we do is when we notice that we're
about to install something in place of our own .exe file,
we move our exe file out of the way (but in the same dir).
Then after we've installed the new exe we call it and ask
it to delete the old file (so we do not litter the bin dir
with lots of old versions). That requires synchronising
between the old and new programs and for the new program
to understand a command to do the syncing and deleting of
the old program. Lots of Win32 FFI imports. :-(
On the plus side it seems to work and is transparent to
the user and the rest of cabal-install. In particular the
actual file-installation code (which is burried deep
within Cabal) does not need to know about the special case
of installing over our own exe file.
@dcoutts dcoutts Don't fail if we don't sync with the child
It just means we leave a temp file around in the bin dir.
Commits on Aug 14, 2008
@dcoutts dcoutts Fetch packages even if they happen to already be installed
Though obviously not if they have already been fetched.
This lets people study the source for core packages that
came with their compiler say, so they did not get have the
sources downloaded via cabal-install. Fixes ticket #297.
@dcoutts dcoutts Add cabal install --reinstall flag
to force reinstall of package where we have the exact same
version already installed. Ordinarily we would say that
there is nothing to do as the exact same package version
is already installed. There are some cases where you might
want to do this, eg to rebuild with different compiler
options, or adding/removing components (since we do not
track those indifidually yet, eg docs, profiling libs).
@dcoutts dcoutts Only look for detailed build reports if we were generating them e123e28
@dcoutts dcoutts Always print the message about nothing to install
Not just if the user specified -v or --dry-run. Otherwise
it's rather confusing. Also clarify that the reason there
is nothing to install is because the latest versions are
installed already. Also mention the --reinstall flag:
  Resolving dependencies...
  No packages to be installed. All the requested packages
  are already installed. If you want to reinstall anyway
  then use the --reinstall flag.
Commits on Aug 15, 2008
@dcoutts dcoutts allow tilde in hackage server URIs
report and fix from Nicolas Frisby <>
(code had changed slightly so the original patch didn't apply cleanly)
Commits on Aug 21, 2008
@dcoutts dcoutts Rearrange config settings and global command line settings
The intention here is to have the config file content and parser
be derivied from the command line types and flags. Now instead
of having a saved config type that contains additional
information to that kept in command line parameters we now put
all the information in the command line settings type and make
the saved config just the aggregation of the settings for
various key commands like configure, install, upload. There's
also an extended GlobalFlags type with the things like repos,
cache dir etc. When we generate the initial config file we put
in commented out versions of all (non-deprecated) valid fields,
along with their default values. The aim is to make the config
file self-documenting.
Commits on Aug 22, 2008
@dcoutts dcoutts Add back separate user and global sets of install dirs
The user install setting selects between the two sets of dirs.
At the moment it's just the "user-" and "global-" prefixed field
names to support existing config files.
@dcoutts dcoutts Add sections for user/global install-dirs to the config file
So it looks like:
install-dirs user
  prefix: /home/username/.cabal
Rather than using user-prefix, global-prefix, etc etc for each
field. The old field names are still recognised but not added
into the initial config file.
@dcoutts dcoutts Add symlink-bindir flag to install/upgrade command
Was previously only available in the config file.
@dcoutts dcoutts Add changelog
I can only trace the history back to the 0.3 era.
@dcoutts dcoutts Actually use the saved install flags when installing 1ac3aee
@dcoutts dcoutts add bootstrap shell script
At the request of Bjorn.
@dcoutts dcoutts Exclude various fields from the config file
Excluded fields that make sense as command line flags but do
not make sense to use every time by saving in the config file.
@dcoutts dcoutts Don't override config with install defaults 893119f
@dcoutts dcoutts Remove old unused modules and supporting util code 2ce6c54
@dcoutts dcoutts Improve the error handling and error message for missing repo index f…
@dcoutts dcoutts Decompress the repo index atomically.
So if decompression fails (eg if the index is corrupt) then
the decompressed file does not get (partially) written.
@dcoutts dcoutts Improve the HTTP error message slightly and note some TODOs 921a9e5
Commits on Aug 24, 2008
@dcoutts dcoutts Use updated tar code
Much more robust. Correctly detects trucated archives.
@dcoutts dcoutts Be less strict in requirements of upgrade
Require current or later version, rather than strictly later
verison. There may be dependencies that cannot be upgraded.
@dcoutts dcoutts Use the right options when compiling external Setup prog
So the cabal version constraint is actually passed in.
This got lost in a previous refactoring.
Commits on Aug 26, 2008
@dcoutts dcoutts Adjust config defaults again
Hopefully a bit clearer now and also means we pass the right
flags to Setup that were compiled with older versions of Cabal.
@dcoutts dcoutts Add release date of 0.5.2 2d53a4e
@dcoutts dcoutts Fix haddock syntax 81627fa
@dcoutts dcoutts Fix up the and include it in the tarball bb96e42