This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- Jan 31, 2016
-
-
kristenk authored
-
kristenk authored
-
kristenk authored
-
Mikhail Glushenkov authored
Add new 'user-config' subcommand 'init'.
-
'cabal user-config init' creates a default config file if it doesn't already exist. If '--config-file' is set, then that file will be written. If '-f' or '--force' is used, then the file will be overwritten if it already exists.
-
- Jan 30, 2016
-
-
Mikhail Glushenkov authored
-
-
- Jan 29, 2016
-
-
Duncan Coutts authored
Solver feature: soft prefs for enabling testsuites/benchmarks
-
Duncan Coutts authored
The solver has the concept of hard constraints and soft preferences. For versions we have both constraints and preferences. We also have soft preferences available for whether we'd like installed instanes or not. We also have hard constraints for enabling "optional stanzas" (ie test suites or benchmarks). This patch adds soft preferences for the same. That is it lets us express the desire to please try enabling test suites and/or benchmarks, but allow them to be disabled if a solution cannot easily be found with them enabled. The implementation is very straightforward and not at all scary. :-) The original design was discussed with kosmikus and it has seen extensive testing in the nix-local-build branch. Optional stanzas in the solver are treated very much like flags, and so we can follow the pattern of a similar feature for flags for this feature for optional stanzas. For both flags and optional stanzas the solver has a node with up to two choices: True & False, corresponding to enable and disable. Various policies can be expressed by reordering these two choices or replacing one or other branch with failure. For example we can force enabling by replacing the False choice with failure. Flag default values are implemented by reordering the True and False branches (since the solver will try the first branch first). So this preference is implemented simply by reordering to put the True branch first (keeping both branches). That way the solver will try the enable branch first and backtrack to the False branch (which imposes no constraints). It integrates smoothly with stanza constraints, which adjusts the False branch to be a failure, thereby forcing the True branch (or further failure). The top down solver is simply adjusted for the types, the feature is not implemented there. The feature is not yet used. It's not intended to have any command line flag, but to express future policies.
-
kristenk authored
Refactor #3082 to reduce code duplication and improve Haddock comment.
-
kristenk authored
-
Duncan Coutts authored
-
- Jan 28, 2016
-
-
Mikhail Glushenkov authored
-
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
Improve algorithm for choosing flags with './Setup configure'
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
-
Duncan Coutts authored
Misc nix-local-build preparation patches
-
Duncan Coutts authored
-
- Jan 27, 2016
-
-
Duncan Coutts authored
Cabal < 1.12.0 doesn't know about '--enable/disable-executable-dynamic' or '--enable/disable-library-coverage'. This is a problem in general, if rare, but it shows up in the nix-local-build branch more obviously since it always passes all flags, including defaults (it does this because the defaults should be determined by the current version, not the older version).
-
Duncan Coutts authored
Make the basic dependencyGraph construction function give us just a Vertex -> UnitId mapping, rather than a full Vertex -> pkg. Then in InstallPlan we keep that Vertex -> UnitId mapping and add a helper function that does the additional lookup to give us a Vertex -> pkg mapping. It's clearer this way, especially in the case of lookup errors.
-
Duncan Coutts authored
This is easier to understand now that the canonical data vs the cached graph is clarified. We only store the main data, the cached info is reconstructed on deserialisation.
-
Duncan Coutts authored
This is to clarify the lazy caching strategy we use for the fields for the Graph (forward and reverse deps, and associated mappings). Reorder the fields, and mark non-lazy fields as strict. Make construction go via a smart constructor that fills in the cached fields.
-
Duncan Coutts authored
Useful for reporting dir/file names in user interface code, e.g. in notices and error messages. Required by later nix-local-build branch patches.
-
Duncan Coutts authored
Required by later nix-local-build branch patches.
-
Duncan Coutts authored
Add Binary instances for many types
-
Duncan Coutts authored
So we can use them in binary cache files. Also relax version constraints on binary to work with binary-0.5.*, which requires that we expose Distribution.Compat.Binary from Cabal. D.Compat.Binary provides the Gerics support that we need to be able to derive instances when using binary-0.5. It's useful to be able to use binary-0.5 since that's the version bundled with older ghc versions.
-
Mikhail Glushenkov authored
remove duplicate LANGUAGE DeriveFoldable, minor improvements
-
kristenk authored
Cabal previously tried all flag combinations, which was very slow. The new algorithm assigns one flag at a time, and backtracks when a flag introduces a dependency that is unavailable. The new algorithm handles the Buildable field by adding an extra conditional at the top level of each component that represents the condition for which the component is buildable. Since all dependencies go under the "then" branch, they are only required when a flag choice makes the component buildable. The buildable logic is taken from the cabal-install dependency solver. This commit also changes the error message that is shown when dependencies are missing. Previously, Cabal printed the shortest list of missing dependencies from a single flag assignment. Now it takes the union of all dependencies that caused it to backtrack when trying different combinations of flags, which requires less searching.
-
Heather authored
-
- Jan 26, 2016
-
-
Mikhail Glushenkov authored
Fix space leak in ./Setup configure
-
Mikhail Glushenkov authored
redundant map after fold
-
Heather authored
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
-
kristenk authored
-
- Jan 25, 2016
-
-
-
Mikhail Glushenkov authored
It uses 'build-type: Simple' now.
-
Mikhail Glushenkov authored
-