This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 01 Oct, 2018 1 commit
    • Nikolai Obedin's avatar
      Track the exact source of ghc-*-options related warnings · 3c1502bb
      Nikolai Obedin authored
      Previously, when running `cabal check` all the various ghc-*-options
      flags were merged together, thus losing the information about the exact
      place of the warning. This PR implements separate checking of
      ghc-*-options, which allows us to give users more precise warnings.
      
      Fixes #5342
      3c1502bb
  2. 09 Jul, 2018 4 commits
  3. 08 Jul, 2018 1 commit
    • quasicomputational's avatar
      Make Setup.hs configure more CWD-independent. · a31ab06a
      quasicomputational authored
      Previously, we were checking the package with a hard-coded root
      directory of ".". This was not a problem before, but with #5372 we
      have started to expand globs while checking packages, which breaks if
      the CWD is not the directory containing the `.cabal` file and causes
      snowleopard/hadrian#634.
      
      Luckily, this is an easy fix: the correct directory is easy to
      determine. Writing a test and making sure it's tickling the failing
      case took longer than writing the fix!
      
      "." is hard-coded as the root directory passed to `checkPackageFiles`
      in a few other places, but those are (a) non-trivial to test, and (b)
      already in places that have other assumptions about their CWD, so I
      have simply documented the CWD requirement for those.
      a31ab06a
  4. 17 Jun, 2018 1 commit
  5. 16 Jun, 2018 1 commit
    • quasicomputational's avatar
      Allow globs to match against a suffix of a file's extensions · e4294f31
      quasicomputational authored
      This has the effect of allowing a glob `*.html` to match the file
      `foo.en.html`. For compatibility, this is only allowed with
      `cabal-version: 3.0` or later; for earlier spec versions, a warning
      will be generated by `cabal check` if there are files affected by this
      change in behaviour.
      
      Fixes #5057. Fixes #784. Closes #5061.
      e4294f31
  6. 25 May, 2018 2 commits
  7. 08 May, 2018 1 commit
    • quasicomputational's avatar
      Allow ** wildcards in globs. · 5e83ef26
      quasicomputational authored
      These are inspired by a plan described in a comment in #2522, and only
      implement a quite limited form of recursive matching: only a single **
      wildcard is accepted, it must be the final directory, and, if a **
      wildcard is present, the file name must include a wildcard.
      
      Or-patterns are not implemented, for simplicity.
      
      Closes #3178, #2030.
      5e83ef26
  8. 28 Apr, 2018 1 commit
  9. 27 Mar, 2018 1 commit
  10. 25 Mar, 2018 1 commit
  11. 06 Mar, 2018 2 commits
  12. 26 Feb, 2018 1 commit
  13. 15 Feb, 2018 1 commit
  14. 08 Feb, 2018 1 commit
  15. 02 Feb, 2018 1 commit
  16. 31 Jan, 2018 2 commits
  17. 19 Jan, 2018 1 commit
    • Oleg Grenrus's avatar
      Change license :: License to Either SPDX.License License · ffbfafd6
      Oleg Grenrus authored
      Resolves #2547
      
      I introduce SimpleLicenseExpression to make "OrAnyLater LicenseRef"
      unrepresentable. That also simplifies types.
      
      license field is parsed as old `License` when cabal-version <2.2,
      and as SPDX expression otherwise. `NONE` is recognised.
      
      There are best-effort functions to convert between `License` and
      `SPDX.License`.
      
      There are also IPI changes: parser accepts both `License` and
      `SPDX.License`, as both can occur in package database. Cabal will
      `register` a SDPX expression as `license` for GHC >= 8.4, and legacy
      `License` for other (we are smart when converting `PackageDescription` +
      LBI and other data to `InstalledPackageInfo`)
      
      Also add NFData InstalledPackageInfo
      ffbfafd6
  18. 16 Jan, 2018 1 commit
  19. 06 Jan, 2018 1 commit
  20. 22 Dec, 2017 1 commit
  21. 17 Dec, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Implement better defaulting for `build-type` · 9fb03d73
      Herbert Valerio Riedel authored
      This implements the following defaulting rules:
      
       * For `cabal-version:2.0` and below, default to the `Custom`
         build-type unconditionally (legacy defaulting)
      
       * Otherwise, if a `custom-setup` stanza is defined, default to
         the `Custom` build-type; else default to `Simple` build-type.
      
      This gets us better defaults for the two most popular use-cases, and
      which can be statically inferred by only looking at the `.cabal` file.
      
      This allows us to bring down the minimal (modern) trivial cabal
      package definition down to a single file with 4 lines:
      
          cabal-version: 2.1
          name: mu
          version: 0
          library
      
      NB: We don't need any `Setup.hs` file, as `cabal sdist` will magically
      generate one on the fly.
      9fb03d73
  22. 16 Dec, 2017 1 commit
  23. 12 Dec, 2017 1 commit
  24. 22 Nov, 2017 1 commit
    • Ben Gamari's avatar
      Split sections support for GHC · 450d6bc4
      Ben Gamari authored
      Add --enable-split-sections flag and pipe it through to the GHC backend. Note
      that some of the implementation here could be made a bit more precise:
      -split-sections and -split-objs are mutually exlusive yet the types don't
      currently reflect this.
      
      Fixes #4819.
      450d6bc4
  25. 15 Nov, 2017 2 commits
  26. 02 Nov, 2017 1 commit
  27. 01 Nov, 2017 1 commit
    • Moritz Angermann's avatar
      Adds sSources and cmmSources. · 4a287659
      Moritz Angermann authored
      # Conflicts:
      #	Cabal/Distribution/PackageDescription/Check.hs
      #	Cabal/Distribution/PackageDescription/Parsec/FieldDescr.hs
      #	Cabal/Distribution/Parsec/Types/FieldDescr.hs
      #	Cabal/doc/developing-packages.rst
      4a287659
  28. 27 Oct, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Make `FlagAssignment` an opaque `newtype` · 6cb6a516
      Herbert Valerio Riedel authored
      This is a refactoring abstracting `FlagAssignment` while retaining its
      external appearance as much as possible (i.e. same Read/Show/Binary
      instances etc).
      
      Later we can attach new instances, enforce internal invariants (like
      e.g. uniqueness of flagnames), switch out the internal
      representation (maybe to `Data.Map`), etc more easily.
      6cb6a516
  29. 13 Oct, 2017 1 commit
  30. 20 Aug, 2017 1 commit
    • Daniel Gröber (dxld)'s avatar
      Demote 'scope' field version check to a warning · 8cd33192
      Daniel Gröber (dxld) authored
      In order to migrate from pre `scope` Setup.hs hacks to 2.0 we would like
      to specify both `scope` and `x-scope` (as just `scope` can't be accessed
      from Setup.hs AFAIK) and handle Cabal<2.0 with custom logic. However
      this check makes this undistributable as hackage would reject the
      package.
      8cd33192
  31. 17 Aug, 2017 2 commits
  32. 16 Aug, 2017 1 commit