This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- 19 Dec, 2017 4 commits
-
-
Mikhail Glushenkov authored
Solver: Deduplicate flags and stanzas in DependencyReason.
-
Mikhail Glushenkov authored
The issue is fixed now.
-
Mikhail Glushenkov authored
Fix NondecreasingIndentation filtering
-
Mikhail Glushenkov authored
-
- 18 Dec, 2017 1 commit
-
-
Herbert Valerio Riedel authored
Improve `build-type` defaulting (see 9fb03d73 and #4958 for details)
-
- 17 Dec, 2017 8 commits
-
-
Herbert Valerio Riedel authored
This tweaks the existing `CustomPlain` test to test the legacy defaulting logic for the unconditionally `Custom` default. Morever, a new `SimpleDefault` test has been added which tests that `cabal-version:2.1` does indeed infer `build-type: Simple` when there is no `custom-setup` stanza defined.
-
Herbert Valerio Riedel authored
-
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.
-
kristenk authored
This commit is unlikely to have an effect on real packages, but it reduces the chance of performance problems caused by duplicate dependencies in the solver quickcheck tests. It also adds a regression test to memory-usage-tests.
-
kristenk authored
It is probably better to simplify version ranges in most cases in the solver, in order to simplify error messages and save memory. Currently, (.||.) is used once for lifting dependencies out of conditionals, and (.&&.) isn't used.
-
kristenk authored
This commit simplifies the solver's internal representation of package conditionals by removing branches that are unreachable. For example, the solver now simplifies if flag(A) if flag(A) build-depends: package-a else build-depends: package-b to if flag(A) build-depends: package-a because A must be true for the second conditional to be relevant to the finalized PackageDescription. This change probably won't improve performance by simplifying real packages. However, it fixes a bug in the solver's handling of a certain edge case. Before this change, it was possible for the solver to create DependencyReasons with conflicting flag values. The conflicting values could cause a problem when one was FlagBoth, the value used when the same dependency appears on both sides of a conditional. Here is an example: if flag(A) if flag(A) build-depends: unknown-package else build-depends: unknown-package Previously, the solver inserted both A=FlagTrue and A=FlagBoth into the DependencyReason for the dependency on unknown-package. When the previous commit changed the association list of flag values into a map, FlagBoth replaced FlagTrue and prevented the solver from trying -A. This commit simplifies the conditionals to: if flag(A) build-depends: unknown-package It also adds some unit tests for dependencies occurring on both sides of conditionals. "testBackjumpingWithCommonDependency" tests the example above.
-
kristenk authored
This commit changes DependencyReason's list fields to maps and sets. Duplicate flags were possible when a flag appeared multiple times in nested conditionals or a flag controlled a "Buildable: False" field. The duplicate flag could show up in log messages: Before: [__5] trying: json-rpc-client:+demo [__6] trying: process-1.6.1.0/installed-1.6... (dependency of json-rpc-client +demo +demo) After: [__5] trying: json-rpc-client:+demo [__6] trying: process-1.6.1.0/installed-1.6... (dependency of json-rpc-client +demo)
-
Herbert Valerio Riedel authored
-
- 16 Dec, 2017 2 commits
-
-
Herbert Valerio Riedel authored
This refactoring unifies the defaulting logic into a single place paving the way for changing the defaulting logic.
-
Herbert Valerio Riedel authored
[skip ci]
-
- 13 Dec, 2017 1 commit
-
-
Oleg Grenrus authored
RFC: Common stanzas
-
- 12 Dec, 2017 4 commits
-
-
Oleg Grenrus authored
- common stanzas can be include other common stanzas - `import: name1, name2` to import multiple stanzas - Parse common stanzas in the same pass with other sections. - Common stanzas have to be defined before use. - Also negative tests - Terse documentation, let's improve it as questions are asked - Edit gen-extra-source-files to include golden files - Amend elif warning to mention cabal-version: 2.2 - In regression golden tests, include also warnings Note: ATM the common stanzas are completely handled inside parser, GenericPackageDescription doesn't know about them anymore. That can be changed, but the the flattening of GenericPackageDescription to PackageDescription may fail. I don't want to do that refactor now.
-
Mikhail Glushenkov authored
[ci skip]
-
Mikhail Glushenkov authored
Should unbork the test suite.
-
George Wilson authored
Not every supported extension for a compiler has a corresponding flag. for example NondecreasingIndentation is enabled by default on GHC 7.0.4, hence it is considered a supported extension but not an accepted flag. To resolve this, wrap Flags in Maybe, and follow through the resulting refactoring. Fixes #4443
-
- 11 Dec, 2017 4 commits
-
-
Mikhail Glushenkov authored
fixed comment typo: 'is' to 'it' [ci skip]
-
Mikhail Glushenkov authored
Fix cases where "it's" was used as a possessive
-
NathanConroy authored
-
George Wilson authored
[ci skip]
-
- 10 Dec, 2017 1 commit
-
-
Herbert Valerio Riedel authored
This represents an incremental improvement over the current state. However, there's more work to be done in terms of restructuring/reordering to present the information in an easier to digest as well as apply the new facilities effectively. This future work will be tracked in #4944. [skip ci]
-
- 07 Dec, 2017 2 commits
-
-
Oleg Grenrus authored
Foreign lib names not parsed by readp
-
Mikhail Glushenkov authored
travis-ci: bootstrap on 8.2.2 as well
-
- 06 Dec, 2017 4 commits
-
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
Skip the Haddock step on macOS.
-
Oleg Grenrus authored
-
Oleg Grenrus authored
-
- 05 Dec, 2017 1 commit
-
-
Mikhail Glushenkov authored
I don't think it ever uncovered any bugs that the Linux bot missed. This should speed up the build a little.
-
- 04 Dec, 2017 8 commits
-
-
tuncer authored
-
Mikhail Glushenkov authored
[ci skip]
-
Mikhail Glushenkov authored
[ci skip]
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
[ci skip]
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
[ci skip]
-