This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- 24 Sep, 2016 1 commit
-
-
Herbert Valerio Riedel authored
Most notably, this allows us to provide a custom instance for `Text`
-
- 22 Sep, 2016 5 commits
-
-
Mikhail Glushenkov authored
-
Mikhail Glushenkov authored
Print the number of jobs we're using.
-
Mikhail Glushenkov authored
As requested by @hvr.
-
Herbert Valerio Riedel authored
Turns out that `RankNTypes` is only needed for the windows-conditional code parts in `CreatePipe`
-
Herbert Valerio Riedel authored
This upgrades the `default-language: Haskell98` to `Haskell2010` and removes `default-extensions: RankNTypes, FlexibleContexts` in favor of adding `LANGUAGE` pragmas where needed. Moroever, this also drops `LANGUAGE` pragmas which have become redundant due to `Haskell2010` (specifically, `EmptyDataDecls`, `ForeignFunctionInterface` and `PatternGuards`) Finally, an `other-extensions` specification is put in place for the `Cabal` library component. This helps loading up files directly in GHCi, such as e.g. `ghci Setup.hs` without having to specify `-X...` flags.
-
- 21 Sep, 2016 6 commits
-
-
Mikhail Glushenkov authored
Don't solve for executables in legacy code path.
-
Mikhail Glushenkov authored
'user-config init': Print the default 'remote-repo' correctly.
-
Edward Z. Yang authored
There is a bug in `cabal configure`'s invocation of the solver in Distribution/Client/Configure.hs: standardInstallPolicy installedPkgIndex (SourcePackageDb mempty packagePrefs) [SpecificSourcePackage localPkg] We can see that the solver is given an EMPTY source package database. This is because we assume that everything you need from cabal configure is taken from the installed package index. But this is NOT true for executables, which never have an entry in the installed package index. So we SHOULD NOT solve for executables in the legacy codepath, since there isn't anything useful we can do with the info anyway. This gets toggled using a new solver parameter SolveExecutables. I didn't bother with a test because this will be obsoleted by nix-local-build. Fixes #3875 Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Never use --enable-profiling when invoking Setup.
-
Herbert Valerio Riedel authored
- Extend `01-index.cache` with timestamps in preparation of `--index-state` - Use 'Binary' encoding for `01-index.cache`
-
Herbert Valerio Riedel authored
This commit was motivated by @dcoutts' code-review comment: > Originally with using the `Sec.directoryEntries` that gave us only the > final version of each file, ie not all intermediate revisions. And > previously our strategy was to go through the final versions of each > file, in file order, and lookup just the ones we're interested in (which > in practice is 99% of them). > > Now for the new cache we want to go through all revisions, which means > all entries in file order. So instead of using `Sec.directoryEntries` > which reads from the tar index, we go straight for `Sec.directoryFirst` > which is block 0 and iterate through, using `lazyUnfold`. > > But we can now significantly simplify this and do it more > efficiently. Note that `indexLookupEntry` and `indexLookupFileEntry` are > expensive operations that seek in the tar file and read the tar entry at > that point. So lets do it exactly once per entry. The current code does > it once in the `lazyUnfold indexLookupEntry` and then again in `mk`. But > the old `mk` only did that because it had not previously looked up the > entry.
-
- 20 Sep, 2016 14 commits
-
-
Mikhail Glushenkov authored
Whitelist branches for travis to build
-
Herbert Valerio Riedel authored
With this commit, if a corrupted index cache is detected the `readIndexCache` function now regenerates the index cache and then reattempt to read the index once (and 'die's if it fails again).
-
Herbert Valerio Riedel authored
-
Mikhail Glushenkov authored
Fixes #3867.
-
Herbert Valerio Riedel authored
This commit extends the index cache entries relevant for 01-index to include block numbers and timestamps, and makes them strict so recent GHCs unpack the fields: data IndexCacheEntry = CachePackageId PackageId BlockNo | CachePreference Dependency | CacheBuildTreeRef BuildTreeRefType BlockNo to data IndexCacheEntry = CachePackageId PackageId !BlockNo !Timestamp | CachePreference Dependency !BlockNo !Timestamp | CacheBuildTreeRef !BuildTreeRefType !BlockNo For the legacy `00-index.tar`s, the 'Timestamp' field is set to (-1), and the original 00-index.cache format is retained. For (secure) `01-index.tar`s, all of `IndexCacheEntry`s data is stored in the `01-index.cache` file. Moreover, to avoid having to write out and parse new two integers per cache entry, this patch switches to using `Binary` instances for encoding the `01-index.cache` file (while `00-index.cache` remains plain-text).
-
Mikhail Glushenkov authored
Add helper for Generic NFData instances
-
Edward Z. Yang authored
This reverts commit 7b67f37b, reversing changes made to c12290f8.
-
Oleg Grenrus authored
-
Edward Z. Yang authored
Installplan installed state
-
Herbert Valerio Riedel authored
-
Herbert Valerio Riedel authored
This is needed in order to support `deepseq < 1.4` which didn't have a `Generic`-based default `rnf` implementation yet. In order to define instances, use e.g. > instance NFData MyType where rnf = genericRnf The implementation has been taken from `deepseq-1.4.2`'s default `rnf` implementation.
-
Mikhail Glushenkov authored
Print that we are building all due to Custom setup.
-
Mikhail Glushenkov authored
Rename configProf/configCoverage local variables to not shadow.
-
bardur.arantsson authored
Clarify the differences with the GetOpt from base
-
- 19 Sep, 2016 14 commits
-
-
Edward Z. Yang authored
In Cabal 1.22.5.0, the semantics of --disable-profiling/--enable-profiling depend on ordering (because there is a hack that operates by looking at the current flag assignment and doing something). In particular, if I specify --enable-library-profiling --disable-profiling, I end up with library profiling DISABLED. The fix is that we NEVER pass --enable-profiling or --disable-profiling to Cabal. At the moment, and according to my historical analysis, Cabal ONLY uses configProf to affect the effective library/executable profiling, which means that anything we do with --enable-profiling, we can do using the library/executable profiling individually. Since these are always flags for the versions of Cabal library we support, we will get order invariance. Historical versions have varied on whether or not setting executable profiling implies library profiling, but if we set both explicitly this change in behavior doesn't matter. This patch is difficult to test because the bad profiling flags can't be induced on an inplace build. I tested by hand by building a package that depended on 'distributive' by hand. Fixes #3790. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Duncan Coutts authored
-
Duncan Coutts authored
All the use sites (currently only two but soon to be three) use InstallPlan.installed to do a bulk change of states, differing only in the filter condition. So it simplifies things and shares more code if we make the main one be the bulk version. The InstallPlan.remove already works similarly.
-
Duncan Coutts authored
Install plan improvement is the process of replacing configured source packages with installed instances from the store. Originally we did this by reading the ghc-pkg db to get the InstalledPackageInfo for all the packages in the store. We had to do that because when we replaced configured source packages by installed instances we used the PreExisting constructor which requires an InstalledPackageInfo, which we get from the installed package db. But now that we no longer use PreExisting for packages from the store we also no longer need the InstalledPackageInfo. All we need is a set of UnitIds. Also, once support for depending on executables was added then we needed a way to do plan improvement for executable packages/components. We did this by the simple approach of grabbing the dir listing for the store and using that as a set of UnitIds. So this patch extends the approach we use for executables and uses it for all packages. This means we no longer load the package db for the store. Note that we still have to create the package db in the store. This also relates to the locking protocol in the store. The goal for the store is to be able to access and update it concurrently. The locking protocol will include checking membership by checking if the directory entry for the package is present. So this patch gets us to the right point for the reading side, leaving the writing side to do.
-
Duncan Coutts authored
And invite anyone to have a go at merging. Also re-export the types from the GetOpt from base rather than re-defining locally. In particular this means we gain a few instances. The changes wrt base GetOpt are: One change to allow us to treat "cabal --flag command" as "cabal command --flag" e.g. "cabal -v configure" to mean "cabal configure -v" for flags that are not recognised as global flags, pass them on to the sub-command. See the difference in 'shortOpt'. Line wrapping in the 'usageInfo' output, plus a more compact rendering of short options, and slightly less padding.
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Print profiling status when displaying install plan.
-
Edward Z. Yang authored
Use enabledBuildInfos rather than allBuildInfo
-
Edward Z. Yang authored
Previously the output was: Building profunctors-5.2 lib... Building semigroupoids-5.1... Now it is: Building profunctors-5.2 (lib)... Building semigroupoids-5.1 (all, due to Custom setup)... Fixes #3808. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
CC @hvr Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Add a new field to solver Done nodes, and simplify Explore.exploreLog.
-
Duncan Coutts authored
Not a big deal, but should be useful later for more precise status reporting. For now just means the rebuild reasons can be more precise.
-
Duncan Coutts authored
We only ever switch Configured to Installed. The PreExisting state only comes from the original solver plan, which only uses installed packages from the global db.
-
Duncan Coutts authored
Change improvement and --dry-run phases to use Installed state rather than the PreExisting state. This means that PreExisting is now only used for installed packages from the global db, and never for installed packages from the store.
-