This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 04 Sep, 2016 2 commits
  2. 23 Jul, 2016 1 commit
  3. 11 Jul, 2016 1 commit
  4. 02 Jul, 2016 1 commit
  5. 25 Jun, 2016 1 commit
  6. 03 Jun, 2016 1 commit
  7. 09 May, 2016 1 commit
    • Duncan Coutts's avatar
      Add better exception handling in new-build · 51da3c74
      Duncan Coutts authored
      When executing the install plan, the various failures are supposed to be
      caught and put into the residual install plan. This adds the main cases
      for that, including the configure and build cases. Download is still not
      covered.
      
      This is a step towards better reporting of what failed when there are
      failures in deps etc.
      51da3c74
  8. 06 May, 2016 1 commit
  9. 26 Apr, 2016 1 commit
  10. 24 Apr, 2016 1 commit
  11. 17 Apr, 2016 2 commits
    • Duncan Coutts's avatar
      Clarify relative vs absolute paths in project package locations · fcb61b70
      Duncan Coutts authored
      Keep the paths relative when the user specifies them as relative.
      This is more consitent for file monitoring and error reporting.
      Convert to absolute later (as expected by other code).
      fcb61b70
    • Duncan Coutts's avatar
      Refactor the Rebuild monad to keep file root in Reader env · bba5a817
      Duncan Coutts authored
      Fixes #3323 and #3324, ensuring we monitor the project Cabal files.
      Original fix by Edward Z. Yang. The approach in this patch is to fix an
      underlying problem. Subsequent patches use a more consistent approach to
      the monitoring as suggested by Edward.
      
      The motivating example is:
      
        matches <- matchFileGlob dirname glob
      
      where matchFileGlob is defined in the RebuildMonad module as
      
      matchFileGlob root glob = do
          monitorFiles [monitorFileGlob glob]
          liftIO $ Glob.matchFileGlob root glob
      
      This usage is wrong because the root used to match the glob is not the
      same as the root that will be used later when checking the file monitor
      for changes. You can see this is suspicious because the declaration of
      the monitor does not take an root dir paramater but the immediate
      matching does. That's because the root for the monitors is specified
      when we do the rerunIfChanged to check the monitor.
      
      So the only correct usage involves passing in the correct root. This is
      a ripe source of bugs. So this refactoring moves the root into the
      Rebuild monad directly, so the example becomes:
      
        matches <- matchFileGlob glob
      
      The root is implicit, so you can't accidentally pick a different root
      for the immediate match vs the later monitor check. Of course the root
      still matters, but if you get that wrong you'll notice immediately
      because you will not get the match results you were expecting.
      
      So the root is now passed in with runRebuild, not with rerunIfChanged.
      
      Also change the incorrect use of matchFileGlob. This use case now
      relies on the adjusted representation of glob roots, using
      FilePath.splitDrive to obtain the root (if any).
      bba5a817
  12. 12 Apr, 2016 1 commit
  13. 10 Apr, 2016 6 commits
    • Duncan Coutts's avatar
      Check for specifying compiler program locations per-package · 3a69f2ea
      Duncan Coutts authored
      You're not allowed to specify a different compiler program for different
      packages within the same project. Given that in general we allow
      specifying config about programs on a per-package basis this needs a
      specific check.
      
      Also add a place and a TODO for Future work in this area which is to
      check up front that we can find the programs and to monitor them for
      changes. Also, currently none of the program config ends up in the
      package hashes, so it doesn't cause them to be rebuilt.
      3a69f2ea
    • Duncan Coutts's avatar
      Clarify a TODO · d3f5f783
      Duncan Coutts authored
      The solverSettingFlagAssignment does not need to be eliminated, it's ok
      to have both, but make a note that it does need validating at some
      point.
      d3f5f783
    • Duncan Coutts's avatar
      Make flag assignments per-package · ef04b699
      Duncan Coutts authored
      Move the FlagAssignment from the project-wide all-packages config to the
      per-package config.
      
      Initially it had been easier to do it globally since it gets used as a
      solver setting rather than as the other per-package config items, but
      obviously it is supposed to be per-package.
      
      So the flags field in the config top-level now applies to all local
      packages. And it can also be specified in package-specific sections.
      
      We don't yet check that any of the flags specified actually make sense
      for either the local packages or for the specific packages.
      ef04b699
    • Duncan Coutts's avatar
      Use MapMappend monoid for the package-specific config · 978aea20
      Duncan Coutts authored
      It's a Map PackageName PackageConfig (or LegacyPackageConfig) so the
      correct monoid instance is to merge the PackageConfig values.
      978aea20
    • Duncan Coutts's avatar
      e8e29025
    • Duncan Coutts's avatar
      Correct path handling for package dirs in project files · f8d3d141
      Duncan Coutts authored
      Both relative and absolute paths. That is, things like:
      
      packages: this/
                ~/hacking/that/
      f8d3d141
  14. 27 Mar, 2016 1 commit
    • Duncan Coutts's avatar
      Extend file globs and file glob monitors · 2d569609
      Duncan Coutts authored and Mikhail Glushenkov's avatar Mikhail Glushenkov committed
      File globs can now be absolute, e.g. starting with / or c:\
      Also allow homedir relative, ie ~/
      
      Globs can also have a trailing slash, in which case they only match
      directories, not files.
      
      Previously whether globs could match dirs was not totally consistent.
      The matchFileGlob would match dirs, but the file monitor globs would
      not. The file monitor globs can now match dirs (or with a trailing
      slash, only match dirs). File monitors now also detect changes in the
      file type, ie switching from file to dir or the other way around.
      
      The file monitor are now pretty consistent between single file monitors
      and globs monitors. They now have equivalent capabilities and share
      code. For a single file or for a glob we can now control what we
      monitor if the path is a file or a dir. In both cases we can monitor
      mere existence, non-existence or modification time. For files we can
      additionally monitor content hash.
      
      File monitors now also detect changes in the file type, ie switching
      from file to dir or the other way around.
      
      New tests cover all these new file monitor cases. There are also new
      tests for glob syntax, covering printing/parsing round trips.
      
      (cherry picked from commit f6c1e71c)
      2d569609
  15. 17 Mar, 2016 3 commits
    • Mikhail Glushenkov's avatar
      Unbreak the build. · ab516463
      Mikhail Glushenkov authored
      ab516463
    • Mikhail Glushenkov's avatar
      Whitespace. · 348fdad7
      Mikhail Glushenkov authored
      348fdad7
    • Duncan Coutts's avatar
      New module for new style project configuration files · 92f018c2
      Duncan Coutts authored and Mikhail Glushenkov's avatar Mikhail Glushenkov committed
      This defines the new cabal.project files and introduces the notion of a
      project root (and the logic for finding it). Also has support for
      implicit projects when no cabal.project file is defined.
      
      Supports both reading and writing project files or fragments. The
      printing & parsing round trips correctly. QC tests to follow.
      
      This is a key part of the new nix-local-build branch approach, based
      around projects with clear configuration state held in a project file
      (or extra files).
      
      This has support for file and dirs as packages within a project,
      including by glob. It supports both globs that much match a target, and
      optional globs that are allowed to match nothing. It has partial support
      for local tarball, remote http tarball and remote source repo packages.
      
      (cherry picked from commit 324b3240)
      92f018c2