This project is mirrored from Pull mirroring updated .
  1. 20 Mar, 2020 2 commits
  2. 16 Mar, 2020 1 commit
    • Oleg Grenrus's avatar
      Disallow wildcards and operators when spec is old · 2afbd0e1
      Oleg Grenrus authored
      Do this already in the Parsec instance parser.
      This allows removing checks from `D.PD.Check`.
      Later this would also allow removing non-relevant
      constructors from `VersionRange`, allowing easier testing.
      This change causes 10% slowdown: from
      135768 files processed
        7350 files contained warnings
      113156 files have check warnings
           0 files failed to parse
      120.901201s elapsed
      117.640431s elapsed
      119.663620s elapsed
      119.454329s elapsed
      119.785214s elapsed
      135768 files processed
       31912 files contained warnings
      113109 files have check warnings
           0 files failed to parse
      130.969593s elapsed
      132.016403s elapsed
      134.214536s elapsed
      128.753382s elapsed
      131.503804s elapsed
      I hope the slowdown is acceptable, and I have an idea which may mitigate
      this. I'll try out it after I done further refactorings.
      Note how (parser) warnings grew by a factor. There are plenty of (old)
      files on Hackage, which don't use correct cabal-version.  For that
      reason we only issue warnings, and not fail.  Quirks approach won't
      scale for these. In comparison, there are even more files
      with check warnings
  3. 15 Dec, 2019 1 commit
  4. 02 Nov, 2019 2 commits
  5. 24 Sep, 2019 1 commit
  6. 15 Jan, 2019 1 commit
  7. 18 Dec, 2018 1 commit
  8. 16 Dec, 2018 2 commits
    • Oleg Grenrus's avatar
    • Oleg Grenrus's avatar
      Introduce Distribution.Fields module namespace · 7150c6d2
      Oleg Grenrus authored
      Split fields related functionality out of `Distribution.Parsec`
      namespace which is not left only to handle "scalar" values.
      This separation highlights that we use `parsec` for *structure* (think
      JSON), and the *values* of the fields (think e.g. dates in JSON).
      - New top-level `Distribution.Fields` and `Distribution.Parsec` modules
        should include most things most people would need.
      - Also `Distribution.Pretty.Field` is moved to `Distribution.Fields.Pretty`,
        as now it has proper place.
      - The commit is moving things around and fixing compilation errors.
      - I fixed `cabal check` parse error printing as I was nearby.
  9. 04 Dec, 2018 1 commit
  10. 28 Nov, 2018 1 commit
    • Oleg Grenrus's avatar
      Move ReadP out of Cabal (to cabal-install) · baf78ca2
      Oleg Grenrus authored
      - Distribution.Compat.ReadP to Distribution.Deprecated.ReadP
      - Distribution.Text to Distribution.Deprecated.Text
      - all Text instances needed by cabal-install to Deprecated.Text too
      - Distribution.ParseUtils to Distribution.Deprecated.ParseUtils
      - Remove deprecated Distribution.PrettyUtils
      - new Distribution.Text with
          display = prettyShow
          simpleParse = simpleParsec
        to not break too much stuff (Custom Setup.hs)
      - parseInstalledPackageInfo type signature changed to use
        `base` types
      This removes around 2k lines from Cabal the library.
      git diff --stat shows less, as files are moved (git is smart).
      Even so, total 300 lines removal at this point.
  11. 26 Nov, 2018 1 commit
  12. 24 Jan, 2018 1 commit
  13. 23 Jan, 2018 1 commit
  14. 27 Dec, 2017 1 commit
  15. 26 Dec, 2017 1 commit
  16. 25 Dec, 2017 1 commit
    • Oleg Grenrus's avatar
      Warn if -- token is found. Don't warn if it's "--". · 93a21714
      Oleg Grenrus authored
      Resolves #2681
      Cabal files don't have trailing line comments. In many fields they
      simply cause parse errors, but e.g. in extra-source-files
      virtually everything is accepted. As there is simple
      work around if people actually want double-dash, let's warn
      about bare one.
  17. 24 Dec, 2017 4 commits
  18. 03 Oct, 2017 1 commit
  19. 20 Sep, 2017 1 commit
    • Oleg Grenrus's avatar
      Introduce FIeldGrammar. · c72fd0e7
      Oleg Grenrus authored
      This commit reworks how GenericPackageDescription is parsed from
      `[Field Position]` and pretty-printed to `Doc`.
      This also fixes few issues:
      - Fix #4697: `cabal format` doesn't output custom-setup stanza (nor
        foreign-lib stanzas)
      - Fix #4719: `parse . pretty . parse = parse`  for all Hackage cabal files.
          - `parser-hackage-tests roundtrip` is the test program.
      The handling of `license-file` and `license-files` is changed.
      Now they behave the same.
  20. 31 Aug, 2017 1 commit
    • Oleg Grenrus's avatar
      Add normaliseVersionRange · cd7140be
      Oleg Grenrus authored
      foldVersionRange' recognises (> x || == v)  and (== x || > x) as
      (>= v), and similarly for <=. Therefore `simpleParsec . display` isn't
      structurally `id`, but `normalizeVersionRange`.
      Also change Text's display to preserve structure of nested unions, i.e.
      don't autoflat it.
  21. 15 Aug, 2017 1 commit
  22. 05 May, 2017 1 commit
  23. 03 Mar, 2017 1 commit
  24. 06 Jan, 2017 1 commit
  25. 26 Nov, 2016 1 commit
    • tulcod's avatar
      Implement foreign library versioning · 8744e30b
      tulcod authored
      This adds support for building foreign libraries with a given ABI version on Linux. This is enables foreign libraries to specify ABI compatibility information. This is important since ABI compatibility differs from package release versions.
      Two new fields are added: lib-version-info and lib-version-linux. The former accept versions Libtool-style, the latter sets SONAME versions directly. In both cases, appropriate symlinks are installed.
      Libtool accepts ABI version data via the -version-info flag, which takes current[:revision[:age]] data. This is then parsed into a version number. We copy this approach so that library versioning may be generalised to other operating systems than Linux.
  26. 14 Nov, 2016 1 commit
  27. 01 Nov, 2016 2 commits
  28. 31 Oct, 2016 2 commits
  29. 29 Oct, 2016 1 commit
  30. 28 Oct, 2016 1 commit
    • Edsko de Vries's avatar
      Add support for foreign libraries. · 382143aa
      Edsko de Vries authored
      A stanza for a platform library looks something like
          platform-library test-package
            type:                native-shared
            if os(Windows)
              options: standalone
              mod-def-file: TestPackage.def
            other-modules:       MyPlatformLib.Hello
            build-depends:       base >=4.7 && <4.9
            hs-source-dirs:      src
            c-sources:           csrc/MyPlatformLibWrapper.c
            default-language:    Haskell2010
      where native-shared means that we want to build a native shared library
      (.so on Linux, .dylib on OSX, .dll on Windows). The parser also
      recognizes native-static but this is not currently supported anywhere.
      The standalone option means that the we merge all library dependencies
      into the dynamic library (i.e., ghc options -shared -static), rather
      than make the created dynamic library just record its dependencies (ghc
      options -shared -dynamic); it is currently compulsory on Windows and
      unsupported anywhere else. The mod-def-file can be used to specify a
      module definition file, and is also Windows specific.
      There is a bit of refactoring in Build: gbuild is the old buildOrReplExe
      and now deals with both executables and platform libraries.
  31. 26 Oct, 2016 2 commits