Skip to content

Comparing changes

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

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
This comparison is big! We’re only showing the most recent 250 commits
Commits on Oct 07, 2007
@bringert bringert Some minor refactoring.n 43129a5
@bringert bringert Some -Wall policing. e307839
@bringert bringert Only configure the compiler once per command. 704638e
@bringert bringert Renamed executable to 'cabal'. b17fe5c
@bringert bringert Set prefix to .cabal by default. caa99f8
@bringert bringert resolveDependencies does not need a list of installed packages as arg…
@bringert bringert Make resolveDependenciesAux pure. 00e14a6
@bringert bringert Check that there is a sanely named .cabal file after unpacking a code…
… tarball.
@bringert bringert Move listInstalledPackages to Config. f796ceb
@bringert bringert Don't export finalizePackage. 435f5f2
@bringert bringert Removed the build-dep command. It has been been broken since we start…
…ed to use configurations, and should be subsumed by the planned cabal-setup integration.
@bringert bringert Some refactoring of the Dependency module. 9e447ed
@bringert bringert Oops, I removed the filtering out of already installed packages from …
@donsbot donsbot Use Cabal.* namespace, not CabalInstall.* (since its the 'cabal' exec…
…utable in the end)
@donsbot donsbot Update to cabal configurations. (Due to broken base numbering though,…
… we can't write a version that works with 6.6 :(
@donsbot donsbot updated license / readme 4edeb40
@donsbot donsbot portable Setup.lhs 9a1f477
@donsbot donsbot move tests under tests 1f04711
@donsbot donsbot move directory hierarchy up one level f3fcc50
@donsbot donsbot Flatten cabal install namespace! 6d54465
@donsbot donsbot polish 3434ee8
@donsbot donsbot -Wall police f5611ab
@bringert bringert Rewrote the package dependency analysis code.
It is now about half as much code, and uses fewer and simpler
functions and data types. The external interface is now much smaller,
which meant that I had to change quite a bit of other code.
I orignally wrote this in parallel with dons' clean-up changes,
and had to merge by hand since darcs went into mad exponential conflict mode.
I hope I didn't revert too many of dons' changes.
Commits on Oct 08, 2007
@bringert bringert Changed zlib >= 0.4 to zlib >= 0.3. 0.3 works fine for me, and 0.4 is…
… not on hackage yet.
@bringert bringert Handle -fflag options. 0dec512
@bringert bringert Changed finalization to say that all installed and available packages…
… can be used to resolve dependencies. This is overly optimistic, since some of the available packages may not be installable because of missing deps. We probably need to look at the entire dependency graph.
@bringert bringert Ok, I see. zlib >= 0.4 is needed since 0.3 wont install with ghc 6.8. 35ab5e2
@bringert bringert Changed configurations to make it build with ghc 6.8 and ghc 6.6. I h…
…aven't tested 6.6.1, but it should work.
Commits on Oct 12, 2007
@dcoutts dcoutts Don't report errors on cleaning when it's already clean
We now ignore file not found errors when deleting the packages dir.
Otherwise when we clean and then clean again we get an exception since
the directory we're trying to delete has already been deleted.
@dcoutts dcoutts Remove the bundled deps as they're totally out of date 76dda43
Commits on Oct 13, 2007
@bringert bringert Call findCompiler in Main for the commands that need it. 451eb23
@bringert bringert Use --with-compiler and --with-hc-pkg. f0d73ad
@bringert bringert cabal list now only shows one line per package, with a list of verions. 6497e0f
@bringert bringert 'cabal install' without argument now installs all the dependencies of…
… the package in the current directory, and then configures, builds and installs it.
@bringert bringert Verbosity fixes. 23030e7
@bringert bringert More verbosity fixes. 8b974d3
@bringert bringert Pass -vN rather that --verbose=N to SetupWrapper, since older version…
…s required --verbosity rather that --verbose.
@bringert bringert Don't say "Nothing to do" when installing the dependencies of a local…
… package.
Commits on Oct 14, 2007
@dcoutts dcoutts Improve the error message we get when missing the package index file 6860f9a
@dcoutts dcoutts Add an extra space when displaying package version lists
eg: "xmonad [0.1, 0.2, 0.3]" rather than "xmonad [0.1,0.2,0.3]"
it's just a tad easier to read.
Commits on Oct 16, 2007
@bringert bringert Change Cabal dep to >=1.2 now that the required patches are in the 1.…
…2 branch. This should really be >= 1.2.1, but the version number of the 1.2 has not been bumped yet.
@bringert bringert Changed zlib dependency to 0.3 to be able to compile using 6.6 and de…
…ps from hackage.
@bringert bringert Added deriving Show to all the types in Hackage.Types, useful for deb…
@bringert bringert Set preifx to the global default when the config file says to do a gl…
…obal install. This still doesn't work if --global is given on the command line. Print the complete config if verbosity >= verbose. Don't save prefix to the config file, since that means we will use the user default even for global installs.
@bringert bringert Removed mtl and unix dependencies, they don't seem to be required. 266e26b
@bringert bringert The ConfigFlags now contain two different sets of install dirs, one f…
…or global and one for user installs.

This simplifies the install dirs handling a lot, and allows the user to specify both user and global install dirs in the config file, and chose installation type on the command line.
We now ignore the config file and command-line compiler flavor when choosing install directories, since that
is so messy. This might break installs with Hugs, but that requires testing.
The old code didn't work when the compiler was specified on the command-line anyway.
@bringert bringert Moved the local package index reading to a new module, Hackage.Index. b80e7e5
@dcoutts dcoutts Parse multiple repo urls listed in the .cabal/config correctly
The url part cannot contain any chars, since then we allow spaces and ',' and
thus break parsing of following repos.
Commits on Oct 17, 2007
@dcoutts dcoutts Make package searches ~100x faster but less featurefull
Instead of parsing every .cabal file in the package list (which is very slow)
We now just get the package name and version and do a case-insensitive
substring search on the package name. The output format remains unchanged.
So we no longer search inside package descriptions.
@dcoutts dcoutts Clean up redundant imports d2c2693
@dcoutts dcoutts Portability fixes to allow building with ghc-6.4 and ghc-6.6 dab882c
@bringert bringert Fixed error message when some depedencies couldn't be resolved. Befor…
…e it used show on Dependency, not showDependency.

Using fail here produces things like:
cabal: user error (Unresolved dependencies: containers -any, array -any, bytestring >=0.9)
It would be nice to get rid of the "user error" here.
@bringert bringert Parse command line arguments as either Dependency or PackageIDentifie…
…r, to allow e.g. 'cabal install binary-0.3'.
@bringert bringert Added explicit Cabal imports to Utils. 16c8ae9
@dcoutts dcoutts Pass on the compiler to use when building a package a5cd2c6
@dcoutts dcoutts It builds with HTTP-3001 as well. 86c9e31
@dcoutts dcoutts Fix handling of unadorned package names
ie make "cabal install xmonad" work ;-)
We were parsing unqalified package names as a dependency upon a specific but
empty version. That is treating "foo" as a dependency like "foo==".
We now treat unadroned package names as deps on any version.
Commits on Oct 21, 2007
@dcoutts dcoutts Update description c3cc71f
@dcoutts dcoutts Bump version to 0.4.0 909b30c
@dcoutts dcoutts TAG 0.4.0 4c45e2c
@dcoutts dcoutts Remove old non-existant copyright file from extra-source-files
We only have one LICENCE file
Commits on Oct 22, 2007
@dcoutts dcoutts Read/write binary files using ByteString without .Char8 modules
ByteString.Char8 treats files as text files, which are really different
on windows. We were getting CRLF translation in Windows which was messing
everything up, like saving & reading the index file.
So now only use BS.Char8 where necessary.
Commits on Dec 15, 2007
@dcoutts dcoutts Replace command line handling
Use the new cabal command line handling infrastructure. Use proper flag types
rather than strings. 
Drop support for per-package command line flags as it was generally agreed to
be confusing.
Commits on Dec 17, 2007
@dcoutts dcoutts Add in more global help text like that of Setup.hs 72411c1
@dcoutts dcoutts installCommand only ever needs to use defaultProgramConfiguration
So don't bother making it a parameter
@dcoutts dcoutts Add command listing support
first step to shell command line completion
@dcoutts dcoutts Add a verbosity flag to the info list update and fetch commands 5a4e6e4
@dcoutts dcoutts Add Upload module direct copy of cabal-upload e670448
@dcoutts dcoutts Add the cabal-setup commands: configure, build etc
So we now have the complete set of commands in one tool.
This uses the new Command infrastructure to do two way conversion between
flags as strings and as a structured parsed form.
@dcoutts dcoutts Remove redundant parameters dfce108
@dcoutts dcoutts Fix usage message, swap program and sub-command names 2b25b54
@dcoutts dcoutts Initial integration of upload feature
It still uses it's own config file, but now uses the same command line stuff
@dcoutts dcoutts Remove unnecessary use of a type alias 314e32b
@dcoutts dcoutts Add Bjorn Bringert to authors and copyright list
Since much recent cabal-install work is his and he wrote cabal-upload which
was just integrated.
@dcoutts dcoutts Get the saved hackage username and password from the config file
rather than from the old ~/.cabal-upload/auth file.
Now uses ~/.cabal/config with:
@dcoutts dcoutts Don't append '.' to filename in message. Make config file end in a ne…
…w line.
Commits on Dec 18, 2007
@dcoutts dcoutts Make logging and verboisty a bit more consistent
Use the Distribution.Simple.Utils functions and eliminate use of printf
@dcoutts dcoutts Improve 'cabal info pkg' message when there is nothing to install
  "All requested packages already installed. Nothing to do."
rather than:
  "These packages would be installed:\n"
followed by ... nothing.
@bringert bringert Added dependency on random. Needed by Hackage.Upload. fd7ae91
Commits on Dec 19, 2007
@kolmodin kolmodin Initial attempt at command line completion 4ae7612
Commits on Dec 21, 2007
@jimburton jimburton Added support for users behind proxy servers, reading system settings…
… from the env var on unix or registry on windows
Commits on Dec 31, 2007
@SyntaxPolice SyntaxPolice improved error handling for multiple installs
When installing multiple packages, don't quit just after the first
error, but rather collect the list of packages that failed to install
continue installing whatever packages we can, and provide an error
message at the end.
@SyntaxPolice SyntaxPolice Added upgrade command
cabal upgrade installs the latest version of any currently installed
Commits on Jan 10, 2008
@dcoutts dcoutts Significantly refactor configuration handling
ConfigFlags is not used in any of the modules that do the real work, instead
we just pass in the necessary information. Renamed ConfigFlags to SavedConfig
and moved it's definition into the Config module. Also change what information
is kept in the Repo type so that it knows the local path too. A PkgInfo now
also knows which Repo it is from.
@dcoutts dcoutts Remove redundant code an re-enable accidentally disabled code 7bfa6dc
@dcoutts dcoutts Depend on latest development version of Cabal lib 1548d09
Commits on Jan 11, 2008
@dcoutts dcoutts Fix getting verbosity flags 8fde04d
Commits on Jan 13, 2008
@dcoutts dcoutts Allow finding the proxy to fail without failing overall
On windows, if looking up the info in the registry failed then we failed
overall. Now we just don't use the proxy. Also refactored a bit.
Commits on Jan 14, 2008
@dcoutts dcoutts Set the user install flag when restoring saved config 459f32a
@dcoutts dcoutts After refactoring the http proxy code we don't need the unix package
Which was just being used for an exception-free version of getEnv but we
have to cope with exceptions anyway for the Win32 registry.
@dcoutts dcoutts Fix compilation on windows
Silly #ifdefs making things harder to test.
Commits on Jan 15, 2008
@dcoutts dcoutts Use commandDefaultFlags = mempty rather than commandAddActionWithEmpt…

Simpler and simplifies the Command api in the Cabal lib
@dcoutts dcoutts Remove unused var d71c594
@dcoutts dcoutts Refactor proxy handling yet again
This time to better handle parsing and warning about invalid proxy uris
@dcoutts dcoutts Use proxy port number rather than ignoring it c4da848
@dcoutts dcoutts Don't verbosely display the http conversation chatter by default
Though do display it at deafening verbosity level.
@dcoutts dcoutts Set the useragent string to be "cabal-install/$version"
eg, currently it is "cabal-install/0.4.2"
@dcoutts dcoutts Have command line args override saved config not the other way around
Fixes setting the --prefix from the command line which was previously being
ignored in favour of the default prefix from the config file.
Commits on Jan 17, 2008
@dcoutts dcoutts Split ParseUtils module out of Utils module 7460fdc
@dcoutts dcoutts Add Utils module, tidy imports af82a98
@dcoutts dcoutts Make a proper RepoIndex ADT
This represents the collection of packages from a remote repo.
It encodes the policies on how we find packages when we have multiple repos.
The policy is encoded in the repo merge operation and in the various kinds of
lookup functions.
@dcoutts dcoutts Move package substring searching into the Index module and use it in …

Not much faster but rather cleaner.
@dcoutts dcoutts Disable a particularly slow invariant check 85190be
Commits on Jan 18, 2008
@dcoutts dcoutts Trivial change to utils d7b63eb
@dcoutts dcoutts Rename Hackage.Index -> Hackage.RepoIndex
In preperation to add Hackage.LocalIndex module
@dcoutts dcoutts Add Hackage.LocalIndex module as an index of installed packages
Very much like the RepoIndex module but only holds package ids at the moment
 rather that full InstalledPackageInfo records that we'd really prefer.
@dcoutts dcoutts Update copyright and docs for RepoIndex
Added my copyright as I've almost completely rewritten the module.
@dcoutts dcoutts Change Dependency module to use the LocalIndex ADT
The whole Dependency module is pure now, no IO since it takes the indexes
as arguments, rather than the many more args required to do the IO to load
up the indexes. Much nicer. Also update all callers.
@dcoutts dcoutts Remove unused listInstalledPackages, replaced by f29de85
@dcoutts dcoutts Add IndexUtils with functions to disambiguate packaage names
To allow us to implement case-insensitivity in package names given on the
command line. We lookup in the package index for packages with the same name
case-insensitively. If there is no exact match exact case-sensitively and
there are more than one packages matching case-insensitively then it aborts
with a message listing the matches. This should not often happen since within
any single HackageDB server, we can check that packages names are unique
case-insensitively but it's possible to get ambiguities if cabal-install has
been configured to use multiple repos.
@dcoutts dcoutts Treat package names given on the command line case insenitively
Implements feature request #167.
Commits on Jan 19, 2008
@dcoutts dcoutts Fix "cabal list" with no package specified 35a0ecd
@dcoutts dcoutts Fix a warning.
All the other warnings are instances of ghc bug #1148.
@dcoutts dcoutts Note in the README than the unix package is not a dependency af635b9
@dcoutts dcoutts Make the configure command take the defaults from the config file
Just like the install command has always done. This makes them consistent.
So by default that means cabal configure uses --user --prefix=$HOME/.cabal
Commits on Jan 20, 2008
@dcoutts dcoutts Rename ResolvedPackage to ResolvedDependency b089153
Commits on Feb 10, 2008
@phigley phigley Fixed imports to correspond to the latest arrangement of Distribution…
Commits on Feb 11, 2008
@dcoutts dcoutts Bump version and required Cabal version
Due to recent Cabal api changes
Commits on Feb 13, 2008
@dcoutts dcoutts -Wall clean bb9a9bc
@dcoutts dcoutts Use setupMessage for consistency in downloading message b334820
Commits on Feb 15, 2008
@dcoutts dcoutts Update to Cabal lib api changes
The InstalledPackageIndex replaces our Hackage.LocalIndex module
Commits on Feb 20, 2008
@dcoutts dcoutts Use a dependency graph rather than a list when installing packages
This allows us to figure out what to do when installing a single package
fails. Instead of just carrying on as if nothing had happened and then
failing several other packages which depended on the one that failed
initially we can cut those dependent packages out as soon as the first one
fails and if there is anything left that did not depend on the failed
package then we can try and carry on.
@dcoutts dcoutts Replace RepoIndex type with PackageIndex PkgInfo
and adapt to the minor finalisePackageDescription change
Commits on Feb 21, 2008
@dcoutts dcoutts Make ResolvedPackage an instance of Package and PackageFixedDeps
And use that to simplify the code slightly. Also add an assertion into
removeFailed, that the first returned result is the failed package itself,
since we'll rely on this in the install code.
@dcoutts dcoutts Make the install code collect some detail on the reasons for package …

Then print out at the end why packages failed. This is a step closer to
producing detailed build reports.
@kolmodin kolmodin Naive implementation of 'cabal check'
A naive implementation of 'cabal check'.
It will list the errors and warnings as implemented by Cabal, yielding them
in groups of severity. Currently ignores verbosity levels, no additional
arguments are understood. This addresses ticket #211.
@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
@spencerjanssen spencerjanssen 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.