This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- 03 Jan, 2016 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 02 Jan, 2016 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 31 Dec, 2015 1 commit
-
-
Edward Z. Yang authored
This reverts commit f907f1a6. This commit caused a regression in Docker, see https://ghc.haskell.org/trac/ghc/ticket/11326
-
- 29 Dec, 2015 3 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 28 Dec, 2015 3 commits
-
-
Erik de Castro Lopo authored
-
Edward Z. Yang authored
I've rewritten the test suite to be more concise and "correct by construction". The primary method that this is achieved by is introducing the 'TestM' monad, which carries around the important state for the tests so that (1) we don't have to pass it as an argument all around, and (2) we can automatically make the correct decisions about how to do things. This new method emphasises "configuration by convention": we assume that a test-case named "Foo" has its test packages in the directory "tests/PackageTests/Foo". A secondary change is that all command functions automatically fail if they have a non-zero exit code (unless you use the 'shouldFail' combinator which inverts the sense.) This saves a lot of typing on test-cases. (In fact, I've reorganized all of the commands related here.) In the process, I've tightened up the logic for how to find the LocalBuildInfo of the Cabal we've testing, so we should now reliably be testing the inplace Cabal library, and not the system library (as was often the case.) Because things are a lot shorter, there is no good reason to make Check modules except for the biggest test cases. Most test-cases have been folded into PackageTests.Tests; if you have a small test-case you should just put it there. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 24 Dec, 2015 1 commit
-
-
Oleg Grenrus authored
-
- 23 Dec, 2015 2 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 22 Dec, 2015 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 21 Dec, 2015 2 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 20 Dec, 2015 1 commit
-
-
Herbert Valerio Riedel authored
GHC 8.0.1 is going to ship with time-1.6
-
- 17 Dec, 2015 2 commits
-
-
Herbert Valerio Riedel authored
This makes the code `-Wcompat`-clean with GHC 8.0 Due to the amount of `Monoid` instances, a compat-layer is used rather than flooding the code-base with CPP conditionals.
-
ee0ed0b9 added another codepath to Distribution.Simple.Program.Find for Win32 platforms however did not add correct imports or a dependency on the Win32 library. Fix this.
-
- 16 Dec, 2015 22 commits
-
-
Herbert Valerio Riedel authored
GHC 8.0 changed the `ErrorCall` type to have an extended constructor, and backward compatibility has been provided via PatternSynonyms: data ErrorCall = ErrorCallWithLocation String String deriving (Eq, Ord) pattern ErrorCall :: String -> ErrorCall pattern ErrorCall err <- ErrorCallWithLocation err _ where ErrorCall err = ErrorCallWithLocation err "" However, due to https://ghc.haskell.org/ticket/8779 the exhaustive-checker doesn't cope well with pattern-synonyms yet, and so we get a non-exhaustive pattern-match failure when matching on 'ErrorCall' now. As the matching on the constructor 'ErrorCall' is done here to help infer the Exception instance, we can also just annotate the type directly, and eschew the problematic pattern match. While at it, this commit also makes this module CPP-free.
-
Mikhail Glushenkov authored
-
Duncan Coutts authored
-
Duncan Coutts authored
About the ghc package dbs in particular.
-
Duncan Coutts authored
For supporting multi instance registrations on older GHC versions.
-
Duncan Coutts authored
For some reason my cpp does not fail with #if THING_NOT_DEFINED but the travis one does, so use #ifdef instead.
-
Duncan Coutts authored
-
Duncan Coutts authored
The ProgramDb Binary instance is a bit odd by leaving out the Programs, only including the ConfiguredPrograms. Of course this is because the Programs contain functions. But the ProgramSearchPath is concrete and should be included.
-
Duncan Coutts authored
This is to allow monitoring programs for changes. The combination of the location where the program was found, and all the other locations where the program was looked for gives the full set of files to monitor for changes in that program. The Program programFindLocation method is extended to return the locations looked at but where the prog was not found. The default implementation of programFindLocation, findProgramOnSearchPath, is extended to return those locations. Other places have to change, mostly just the type. In a couple places in GHC & GHCJS where there is additional searching done, the not-found locations have to be collected and returned.
-
Duncan Coutts authored
But in this patch, don't actually return them yet, so not yet changing the resturn type. The purpose here is change monitoring. In cabal-install we want to be able to automatically re-run various actions when the build environment changes, including when programs have changed (e.g. due to a $PATH change, finding the compiler in a different location). The basic information required for such change monitoring is not only the location where a program was ultimately found, but all the locations where it was looked for and not found. Otherwise one will miss the case where having previously found the program in one location, later on the program appears earlier in the search path. In this case a build system should notice and react, but if it only monitors the ultimate location where the program was found then this is impossible. The build system also needs to monitor the locations where the program was not found, to make sure it is still not there. This principle actually applies anytime we have a file search (e.g. hs-source-dirs), programs are just one example.
-
Duncan Coutts authored
The findProgramOnSearchPath function is what we use in most places to implement the Program abstraction's programFindLocation method. Re-export it via Program module. The only place that was still using the old findProgramLocation instead was in HaskellSuite. Deprecate findProgramLocation which is now no longer used. This is in preparation for changing the return type of findProgramOnSearchPath.
-
Duncan Coutts authored
It provides a way to find out what files need to be monitored to detect changes in a compiler's package database. This is not used within the Cabal lib.
-
Duncan Coutts authored
-
Duncan Coutts authored
With support for GHC and GHCJS. All Cabal lib internal uses remain traditional single instance, so there's no change of behaviour.
-
Duncan Coutts authored
This supports the feature of newer ghc-pkg version which have the register --enable-multi-instance flag. This allows registering multiple instances of the same version of a package into a single database. In addition, to support the same feature on some older ghc-pkg versions, the HcPkgInfo has a recacheMultiInstance capability, which tells us if the trick of registering multiple instances by running ghc-pkg recache works. This is known to work for all versions of ghc-pkg that support the recache command at all. Then HcPkg.registerMultiInstance will use one of the two methods depending on which is supported, or fail if neither is. Currently only registering into specific package dbs is supported, not global or user. This new multi-instance feature is needed for cabal-install.
-
Duncan Coutts authored
Invocation support but not used yet.
-
Duncan Coutts authored
Part 1: just add the fields and fill them in for each HcPkg user.
-
Duncan Coutts authored
Prior to further extension. Just share the common args calculation.
-
Duncan Coutts authored
And fix up the db path for UHC. UHC cannot just register anywhere, like compilers that have a hc-pkg can. It has to be special locations. Now that registerPackage no longer takes the inplace :: Bool arg, UHC's impl of registerPackage has to get the dir from the PackageDbStack without knowing if it's implace or not. So the correct inplace location has to be set earlier for the inplace package db, which is what this does.
-
Duncan Coutts authored
Add doesPackageDBExist and deletePackageDB, and export the new createPackageDB. This gives a more complete compiler-independent API for package db manipulation.
-
Duncan Coutts authored
The HcPkgInfo useSingleFileDb is split into two: supportsDirDbs and requiresDirDbs. Then rather than HcPkg.init callers having to do the writeFile [] thing, HcPkg.init does it itself automatically based on the HcPkgInfo. In the case that supportsDirDbs is True but requiresDirDbs is False then we have a choice, to use dir style or file style. For compatability reasons, when using ghc/ghc-pkg for the inplace package db we want to use the old file style, even though dir style is supported. However in other circumstances (e.g. in places in cabal-install) we would like to use the dir style if it's supported, and there are no backwards compat issues. So HcPkg.init gains a new Bool arg to request using the file style if it's still supported. Only this mode is used within Cabal itself, but the non-compat mode is available for other users. The compiler-independent initPackageDB is left with the same old behaviour, but a new createPackageDB has the extra compat argument (which is only passed to hc-pkg for ghc-pkg).
-
Duncan Coutts authored
Drop the now-unused PackageDescription and inplace :: Bool args. And instead of taking the whole LocalBuildInfo, just take the bits we need: the compiler and program db. The package db stack was already passed in separately. Also reorder args to follow standard conventions.
-