This project is mirrored from Pull mirroring updated .
  1. 14 Jul, 2018 18 commits
    • Duncan Coutts's avatar
    • Duncan Coutts's avatar
      Add support for project packages from local tarballs · 82ba8f13
      Duncan Coutts authored
      Local .tar.gz tarball files can be listed in the 'packages:' field in
      the cabal.project file. These are expected to be in the normal Cabal
      source tarball format containing a single package.
    • Duncan Coutts's avatar
      Refactor: add readSourcePackageCabalFile parser wrapper · 1458b161
      Duncan Coutts authored
      We need a wrapper that takes the file by value, to cover the tarball
      case. While we're at it, we report warnings on higher verbosity levels
      and use proper exceptions to make error handling more consistent.
    • Duncan Coutts's avatar
      Refactor: introduce mkSpecificSourcePackage helper · 84a17d90
      Duncan Coutts authored
      Avoid duplication in each of the helpers for fetchAndReadSourcePackages
      (of which there will be several in the end).
    • Duncan Coutts's avatar
      Try yet again with the windows file lock problem · 6c09d448
      Duncan Coutts authored
      Try the "retry N times on permission errors" strategy.
    • Duncan Coutts's avatar
      Bump up the delay again · b72d7173
      Duncan Coutts authored
    • Duncan Coutts's avatar
      Correct the git config cli syntax · 9f31c1c7
      Duncan Coutts authored
      Apparently I misread the man page bit about omitting the '='.
    • Duncan Coutts's avatar
      Handle git version numbers on windows · a55e9ee5
      Duncan Coutts authored
      It reports things like 'git version'
    • Duncan Coutts's avatar
      Try to fix the VCS tests: git commit on windows · 3a5f02d8
      Duncan Coutts authored
      Needs extra (fake) config to be supplied on the command line otherwise
      it complains it doesn't know the author name or email.
    • Duncan Coutts's avatar
      Tweak the windows file locking hack · 1e998287
      Duncan Coutts authored
      Put it in the cleanup handler so it always runs, exception or not.
    • Herbert Valerio Riedel's avatar
      Increment duncan's windows sleep-hack from 1s to 10s · 4a12f6f7
      Herbert Valerio Riedel authored
      NB: this is only for confirming a theory
    • Duncan Coutts's avatar
      Attempt to fix VCS tests on Windows · 539bc160
      Duncan Coutts authored
      On Windows, file locks held by programs we run (in this case VCSs) are
      not always released prior to completing process termination! Obviously
      this is total madness since we can't know what files the child process
      had locks on, and so we cannot wait for those locks to be released.
      This means we run into stale locks when trying to delete the test
      directory. There is no sane way to wait on those locks being
      released, we just have to wait and hope. Lets hope 1 second is enough.
    • Duncan Coutts's avatar
      Refactor (and rename) fetchAndReadSourcePackages · 31af8e27
      Duncan Coutts authored
      In preparation for adding support for additional target types (local and
      remote tarballs, local and remote source repos), refactor the existing
      readSourcePackage action so it can be more easily extended to support
      the extra target types.
      In particular, having to download things means there are advantages to
      handling all the packags in a batch. Indeed for source repos there will
      be quite a bit of sharing, so they must be handled as a batch.
    • Duncan Coutts's avatar
      Add tests for the new 'get -s' implementation · 42e52bbb
      Duncan Coutts authored
      It covers all the failure modes, and currently includes one actual
      network test where we fetch a git repo. There is a new testsuite feature
      flag to disable network tests, and we probably want to use that in CI.
    • Duncan Coutts's avatar
      Change 'get -s' impl to use new VCS abstraction · a4120f49
      Duncan Coutts authored
      This replaces the previous Brancher abstraction. It improves the error
      There is a very slight change of behaviour: previously if a package
      specified multiple source repos with different types (e.g. git/darcs)
      and only one of those VCS tools was installed on the system, it could
      fall back to selecting the other repo using the other tool. The new
      behaviour is that it picks the repo to use deterministically, and then
      simply fails if the VCS program is not available. This situation is very
      rare, and arguably the new behaviour is more predictable.
    • Duncan Coutts's avatar
      Preparation: rename fork/clone within the Get module · fa30556d
      Duncan Coutts authored
      The standard term seems to be 'clone' rather than 'fork' for the action
      of downloading a VCS repo.
    • Duncan Coutts's avatar
      Add QC tests for the VCS abstraction · 9bcd5e20
      Duncan Coutts authored
      This is a hopefully rather comprehensive approach: we generate an
      arbitrary description of how to make a repo, and model what content we
      would expect for every tag/commit. Then we can compare with executing
      the description for the real VCS and comparing the actual file content
      for any tag/commit.
      This is then the basis for checking for the various VCS drivers that we
      can (construct and) clone and sync repos properly. In particular for
      syncing this gives some confidence that we can sync for any plausible
      cached previous repo state.
    • Duncan Coutts's avatar
      Add a new VCS abstration · c738ddd1
      Duncan Coutts authored
      This is intended for two things:
       * replacing the Brancher abstraction backing the current 'get -s' impl
       * the basis for source repo support in cabal.package files
      The latter is a bit more complex as it requires not just fetching a
      fresh repo, but syncing a repo to a specific tag, commit or branch. The
      approach assumes that we keep a cached copy so that most changes are
      cheap and it optimises things by allowing sharing data between multiple
      commits of the same repo, and multiple packages within the same repo.
      For example, it will be possible to specify the same repo in the
      cabal.project file for more than one package, and have those packages
      either in separate subdirs of the same commit, or on different
      commits/tags/branches. In the former case we use a single checkout
      while in the latter case we use two checkouts, but share repo data as
      far as possible.
  2. 13 Jul, 2018 22 commits