This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- 20 Mar, 2020 2 commits
-
-
Oleg Grenrus authored
-
Oleg Grenrus authored
The speed-up is smaller than I would like, only 1-2%.
-
- 16 Mar, 2020 1 commit
-
-
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 ``` to ``` 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
-
- 15 Dec, 2019 1 commit
-
-
Oleg Grenrus authored
Or replace Just foo = rhs with foo = fromMaybe (error "...") rhs which there are plenty. I didn't tried to refactor these errors away, let cabal panic, if it hits them.
-
- 02 Nov, 2019 2 commits
-
-
Dale Wijnand authored
-
Add safe alternatives to some partial functions in Distribution.Utils.Generic, and removes the originals from Distribution.Compat.Prelude Uncomment versions of functions in Distribution.Compat.Parsing that return non-empty lists Co-authored-by:
Dale Wijnand <dale.wijnand@gmail.com>
-
- 24 Sep, 2019 1 commit
-
-
Oleg Grenrus authored
-
- 15 Jan, 2019 1 commit
-
-
Herbert Valerio Riedel authored
-
- 18 Dec, 2018 1 commit
-
-
Herbert Valerio Riedel authored
-
- 16 Dec, 2018 2 commits
-
-
Oleg Grenrus authored
-
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.
-
- 04 Dec, 2018 1 commit
-
-
Oleg Grenrus authored
-
- 28 Nov, 2018 1 commit
-
-
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.
-
- 26 Nov, 2018 1 commit
-
-
Oleg Grenrus authored
-
- 24 Jan, 2018 1 commit
-
-
Oleg Grenrus authored
Resolve #5025
-
- 23 Jan, 2018 1 commit
-
-
Oleg Grenrus authored
A little refactoring in handling UTF8, it's validated as a preprocess step, so consequent steps can simply use lenient streams.
-
- 27 Dec, 2017 1 commit
-
-
Mikhail Glushenkov authored
Also undo a change committed by mistake. [ci skip]
-
- 26 Dec, 2017 1 commit
-
-
Oleg Grenrus authored
-
- 25 Dec, 2017 1 commit
-
-
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.
-
- 24 Dec, 2017 4 commits
-
-
Oleg Grenrus authored
-
Oleg Grenrus authored
-
Oleg Grenrus authored
CabalSpecVersion type-class will allow to gather per-spec conditionals. Currently it's used for selecting parsers / grammatical structure. Leading (or trailing commas) for CommaFSep/CommaVSep fields, i.e. fields with mandatory comma are (atm): - build-depends - build-tool-depends - build-tools - mixins - pkgconfig-depends - reexported-modules - setup-depends
-
Oleg Grenrus authored
Distribution.SDPX.LicenseId and Distribution.SDPX.LicenceExceptionId are generated.
-
- 03 Oct, 2017 1 commit
-
-
Mikhail Glushenkov authored
[ci skip]
-
- 20 Sep, 2017 1 commit
-
-
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.
-
- 31 Aug, 2017 1 commit
-
-
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.
-
- 15 Aug, 2017 1 commit
-
-
Oleg Grenrus authored
-
- 05 May, 2017 1 commit
-
-
Daniel Gröber (dxld) authored
-
- 03 Mar, 2017 1 commit
-
-
John Ericson authored
-
- 06 Jan, 2017 1 commit
-
-
John Ericson authored
-
- 26 Nov, 2016 1 commit
-
-
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 major.minor.build version number. We copy this approach so that library versioning may be generalised to other operating systems than Linux.
-
- 14 Nov, 2016 1 commit
-
-
John Ericson authored
Also gets rid of `Distribution.Packages.TextClass`
-
- 01 Nov, 2016 2 commits
-
-
John Ericson authored
Plain `Dependency` should strictly refer to a Haskell Package, usually the library component of that package.
-
John Ericson authored
Is this an intentional inconsistency with the old parser?
-
- 31 Oct, 2016 2 commits
-
-
John Ericson authored
-
Construction and destruction follows the usual pattern with `mkFlagName` & `unFlagName` functions.
-
- 29 Oct, 2016 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 28 Oct, 2016 1 commit
-
-
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 MyPlatformLib.SomeBindings 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.
-
- 26 Oct, 2016 2 commits
-
-
Oleg Grenrus authored
-
Oleg Grenrus authored
-