Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Apr 08, 2016
  2. Mar 27, 2016
    • 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
  3. Feb 19, 2016
    • Duncan Coutts's avatar
      FileMonitor: handle changes during an update action · a15d0d77
      Duncan Coutts authored
      If we take the snapshot after the action has completed then we have a
      problem. The problem is that files might have changed while the action
      was running but /after/ the action read them. If we take the snapshot
      after the action completes then we will miss these changes.
      
      The solution is to record a timestamp before beginning execution of the
      action and then we make the conservative assumption that any file that
      has changed since then has already changed, ie the file monitor state
      for these files will be such that checkFileMonitorChanged will report
      that they have changed.
      
      Makes use of this in the Rebuild monad so everything using this will get
      the feature for free. Also adds a test.
      
      Changed the representation of files that have already changed by the
      time we take the snapshot. We had two extra constructor, but now instead
      we represent it with the normal constructors but with a Maybe ModTime.
      The reason is that it's easier to extend to the globbing case.
      a15d0d77
  4. Feb 16, 2016
  5. Feb 15, 2016
  6. Feb 14, 2016
  7. Feb 07, 2016
Loading