This project is mirrored from Pull mirroring updated .
  1. 05 Mar, 2008 1 commit
    • Duncan Coutts's avatar
      Fix configure for hugs where we don't know what packages are installed · 23e64722
      Duncan Coutts authored
      For Hugs, nhc98 and other compilers we do not know what packages are
      already installed, so we just make some up, pretend that they do exist
      and just hope for the best. We make them up based on what other package
      the package we're currently building happens to depend on.
      See inventBogusPackageId. Let's hope they really are installed... :-)
      One could see this as all rather redundant - carefully making up bogus
      information to satisfy a careful check. I prefer to see it as making
      explicit something that was previously implicit. The proper solution is
      to discover what packages are currently installed.
  2. 03 Mar, 2008 2 commits
    • Duncan Coutts's avatar
      Put a header in the dist/setup-config file and check it on loading · e15289e4
      Duncan Coutts authored
      This should fix ticket #120 in future which is the problem where you do
      something like "sudo runghc Setup install" and you accidentally end up
      using a different version of the compiler or of the Cabal lib and you get
      an unhelpful error message:
      > Setup.hs: error reading ./.setup-config; run "setup configure" command?
      Well now you'll get a helpful error message:
      > setup: You need to re-run the 'configure' command. The version of Cabal
      > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7).
      If the compiler version being used has changed too we get the extra helpful:
      > setup: You need to re-run the 'configure' command. The version of Cabal
      > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7). Additionally
      > the compiler is different (was ghc-6.8, now ghc-6.9) which is probably
      > the cause of the problem.
      Of course this does not help for older versions of Cabal but there's not a
      lot we can do about that.
    • Duncan Coutts's avatar
      Extend and use the OS data type in the package description · 3108588e
      Duncan Coutts authored
      Rather than just using a string. This makes comparing OSs easier since
      we can normalise them once when we parse rather than every time we compare.
      Also makes it easy to discover when a package mentions an unknown OS since
      it's marked as Other "whatever".
  3. 27 Feb, 2008 1 commit
    • Duncan Coutts's avatar
      Revert some of the UTF8 changes, use UTF8 only for files we know are UTF8 · c99ac791
      Duncan Coutts authored
      So we use ordinary read/writeFile for ordinary text files. For console
      output we use ordinary putStr etc and we'll just hope that haskell
      implementations catch up and deal with that sensibly. Don't assume
      captured program output is UTF8, use the default encoding.
      So we use binary mode IO along with UTF8 encoding and decoding only for 
      file types that we specify to be UTF8, which are .cabal files and
      .hs/.lhs files only.
  4. 24 Feb, 2008 1 commit
  5. 22 Feb, 2008 2 commits
  6. 21 Feb, 2008 1 commit
  7. 20 Feb, 2008 3 commits
  8. 19 Feb, 2008 2 commits
    • Duncan Coutts's avatar
      Add the InstalledPackageIndex to the LocalBuildInfo · 1880702c
      Duncan Coutts authored
      So now all the info about installed packages is available to all the
      verious build phases.
    • Duncan Coutts's avatar
      Detect broken and inconsistent package deps · 5115bb2b
      Duncan Coutts authored
      We now check for packages that are broken due to their dependencies having
      been unregistered. We fail and print a fairly sensible message in this case.
      We also check for inconsistent dependencies and give a warning saying which
      packages are depending on inconsistent versions of a third. This is a warning
      not an error because it does not always lead to failure. Hopefully it'll help
      people who are otherwise just running into random compile errors.
      This fixes ticket #220.
  9. 18 Feb, 2008 1 commit
  10. 15 Feb, 2008 4 commits
  11. 12 Feb, 2008 1 commit
  12. 11 Feb, 2008 1 commit
    • Duncan Coutts's avatar
      Unify sanity and other checks and separate IO checks · a42f06cc
      Duncan Coutts authored
      And rename from QA so we no longer pretend to assure anything :-)
      We now distinguish different kinds of tests with a PackageCheck type so the
      caller gets to decide which kinds of checks are relevant to the context.
      This PackageCheck type should be extensible if we want to add more kinds or
      more info besides a brief human readable explanation.
  13. 05 Feb, 2008 2 commits
  14. 23 Jan, 2008 2 commits
  15. 22 Jan, 2008 1 commit
  16. 10 Jan, 2008 2 commits
    • Duncan Coutts's avatar
      Make --user --global change the default prefix · e158a238
      Duncan Coutts authored
      Previously --user and --global didn't mean what it looks like they mean,
      instead of doing a per-user or a global installation they just meant to
      register in the per-user or global package databases (and to allow
      dependencies to be satisfied from the per-user or global db)
      With this patch --user / --global means to do a per-user or global install
      so in addition to the package db differences it also sets the default 
      installation prefix. This prefix can of course still be overridden using the
      --prefix= flag. The global prefix is as before, the default per-user prefix
      is $HOME/.cabal on Unix and on Windows it's something like:
      C:/Documents And Settings/$user/Application Data/cabal
      (using getAppUserDataDirectory "cabal"). This is the per-user prefix that
      cabal-install currently uses. We can change it if people think it's not good.
    • Duncan Coutts's avatar
      Un-deprecate configCompilerAux · 17d2148e
      Duncan Coutts authored
      but make it do something sensible with the ProgramConfiguration
  17. 15 Dec, 2007 1 commit
    • Duncan Coutts's avatar
      Make all command line flags and flag collection types monoids · 1352ee0b
      Duncan Coutts authored
      And specify command flags in a way that allows converting from or two strings.
      So not only can we parse command lines into the various flag types, we can
      convert back. This is crucial in cabal-install so that we can call Setup.hs
      scripts with all the various args, and override certain flags in a typed way
      rather than just representing them all as strings.
  18. 08 Dec, 2007 2 commits
    • Duncan Coutts's avatar
      Replace lots of configBlahDir fields with just one InstallDirs · f9a8db92
      Duncan Coutts authored
      So instead of 10 fields like this:
      configPrefix   :: Maybe FilePath,
      we have just one compound one:
      configInstallDirs   :: InstallDirs (Maybe FilePath)
      Now that LocalBuildInfo and cabal-install's config use InstallDirs it makes
      converting a lot easier since we can use fmap and combineInstallDirs.
      This should also be easier to maintain as it has significantly reduced the
      number of places in the code you have to change when you add/change a dir.
    • Duncan Coutts's avatar
      Merge InstallDirTemplates into InstallDirs · 6dfd6261
      Duncan Coutts authored
      This simplifies things and makes it a bit more versatile since
      we can use things like InstallDirs (Maybe PathTemplate).
  19. 07 Dec, 2007 1 commit
  20. 05 Dec, 2007 1 commit
    • Duncan Coutts's avatar
      export ccLdOptionsBuildInfo helper function · e86d338e
      Duncan Coutts authored
      Useful in Setup.hs scripts for things like HSQL that need to
      find CC and LD flags by calling foo-config style programs.
      The same function is used internally for pkg-config support.
  21. 16 Nov, 2007 1 commit
  22. 14 Nov, 2007 1 commit
  23. 24 Oct, 2007 2 commits
  24. 23 Oct, 2007 1 commit
    • Simon Marlow's avatar
      Refuse to run any commands if the .cabal has been modified · 1f05d301
      Simon Marlow authored
      See GHC bug #1372
      This is a consistency check, intended to prevent this class of build
         * Package P is updated, its version number is bumped, the
           new version is compiled and installed.
         * Package Q depends on P.  Q is modified to use the new P, and Q's
           .cabal file is updated with changes to the build-depends field to
           depend on the new version of P.
         * The user has an old build of Q.  They pull the changes to Q and
           'setup build' without cleaning or re-configuring.  Build errors
           ensue, because the code of Q depends on changes to P's API, and
           we're still building against the old P.
      Note that you can't get segfaults this way, only build errors.
      This also relies on some new consistency checking in GHC 6.8 to work
      properly.  If the user re-configures their Q build and then issues
      'setup build' without cleaning, GHC must now realise that the package
      flags have changed, and re-compile all the affected Q modules.  GHC
      6.6 would not do this, but 6.8 does.
  25. 12 Oct, 2007 1 commit
  26. 12 Sep, 2007 1 commit
  27. 31 Aug, 2007 1 commit