Commit Graph

95 Commits

Author SHA1 Message Date
Daniel Gröber
80e2761f2f Ghc->GhcMod: finish Browse, Check 2014-05-14 18:05:40 +02:00
Daniel Gröber
f1535efcf2 Ghc -> GhcMod: Browse, Check 2014-05-14 17:06:29 +02:00
Kohei Suzuki
bcd2dfcffc Add test for no errors case 2014-05-11 00:30:02 +09:00
Daniel Gröber
f949e4be7a Copy ComponentLocalBuildInfo from Cabal-1.18
This way `configDependencies` works even when the Cabal version used by
cabal-install is later than the one used by ghc-mod.
2014-05-10 02:04:09 +02:00
Daniel Gröber
44b897c6a5 Print useful information when running spec 2014-05-09 20:37:55 +02:00
Daniel Gröber
8741323f5b Fix tests for Cabal <= 1.16 2014-05-09 20:37:15 +02:00
Daniel Gröber
b8f9498f83 Fix reading of older Cabal setup-configs 2014-05-09 20:35:13 +02:00
Kazu Yamamoto
8561e7b656 To break cyclic import, this patch makes GhcPkg.hs independent from Monad.hs(refactoring for #244)
This removes `ghcPkgList`, `ghcPkgListEx` and `ghcPkgDbOpt`. I'm not sure
this is a right way to do.
2014-05-08 12:42:45 +09:00
Daniel Gröber
81504de8bd spec: Be more forgiving for ghc opts in getCompilerOptions 2014-05-05 09:26:56 +02:00
Daniel Gröber
635830b527 Fix #242, ghcPkgList(Ex) on NixOS 2014-05-05 00:29:10 +02:00
Daniel Gröber
f750d10a9a Cabal needs empty 00-index.cache and 00-index.tar in sanxbox 2014-05-03 15:38:27 +02:00
Daniel Gröber
96a54d2148 Remove test/*/setup-config before spec 2014-05-03 15:38:27 +02:00
Daniel Gröber
2839d6b557 Add UtilsSpec 2014-05-03 15:36:10 +02:00
Daniel Gröber
92d0eec2bc Fix failing test 2014-05-03 15:36:10 +02:00
Daniel Gröber
0c859294a3 Parse cabal setup-config to get depencencies 2014-05-03 15:36:10 +02:00
Daniel Gröber
82d1d6b982 Add cabal file to duplicate-pkgver test data
It's not really valid but enough to make ghc-mod happy, without it
findCradle doesn't work properly and without the empty `library`
sections it crashes even.
2014-05-03 15:35:04 +02:00
Daniel Gröber
759a6efab1 Add some test data
..for testing behaviour with multiple versions/ids of packges being
available
2014-05-03 15:35:04 +02:00
Daniel Gröber
ee0135aac2 Correct check-packageid/cabal.sandbox.config.in 2014-05-03 15:35:04 +02:00
Daniel Gröber
0206085662 Generate ghc package.cache before running spec 2014-05-03 15:35:04 +02:00
Kazu Yamamoto
17b80ccc2f doctest includes macro. 2014-04-24 23:11:55 +09:00
Daniel Gröber
1639a7b2e0 Bring spec up to speed 2014-04-18 04:00:01 +02:00
Daniel Gröber
bb438feb83 User ghc's cProjectVersionInt to get version information 2014-04-16 01:57:52 +02:00
Daniel Gröber
7d75787ae3 Only add available package to ghc options
Fixes #185
2014-04-15 05:18:42 +02:00
Daniel Gröber
30b8366526 Refactor the way packages databases are handled
- cradle now stores a list of active package databases instead of only
  the user store (if present).

- rename `cradlePackageDb` -> `cradlePkgDbStack` as that`s what the ghc
  documentaion calls this kind of thing

- `getPackageDbPackages` now returns names of all visible packages in
  the given directory. Also the implementation now uses `ghc-pkg`
  instead of manually looking at the package database
2014-04-15 05:15:50 +02:00
Kazu Yamamoto
e9859980ab info/type does not require module name.
Fallback was removed. See #199.
2014-04-11 11:51:25 +09:00
Kazu Yamamoto
3bfbbb8b5c supporting sandbox only (without cabal) to fix #164. 2014-03-30 17:28:57 +09:00
Kazu Yamamoto
955b1b4091 user package db options for both GHC and ghc-pkg. 2014-03-28 12:05:11 +09:00
Kazu Yamamoto
a4ce3a5650 fixing test. 2014-03-26 14:49:37 +09:00
Kazu Yamamoto
16e050439d removing fast/slow code. 2014-03-17 15:56:00 +09:00
Kazu Yamamoto
9c30b11667 typo. 2014-03-13 09:34:45 +09:00
Naohiro Aota
04022ab0ac Add test to check package id extraction
This commit add a failing test to check extracting package id. The test will
fail with the following output for now:

1) Cradle.getPackageDbPackages find a config file and extracts packages with their ids
expected: [("template-haskell",Just "template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c")]
 but got: []
2014-01-30 21:18:45 +09:00
Naohiro Aota
a0db24b0a5 Extend Package to include id
This commit
1. rename Package with PackageBaseName
2. Pacakge = (PackageBaseName, Maybe String) to save its id
3. Expose packages with id if available
2014-01-30 20:45:30 +09:00
Kohei Suzuki
f9c9ac676c Work around canonicalizePath "/" in GHC 7.2.2 2014-01-14 15:24:10 +09:00
Sergey Khorev
429cdfa83b Try loading a module if findModule failed for it 2013-11-20 08:57:45 +04:00
Kazu Yamamoto
2c9b4227dd Trying to resolve Travis fails. 2013-10-07 16:39:54 +09:00
Kohei Suzuki
b0f20ffb04 Support GHC < 7.6.0 which doesn't have getExecutablePath 2013-10-05 12:19:30 +09:00
Kohei Suzuki
9469058d58 Fix builded ghc-mod's path for cabal-sandbox environment 2013-10-05 12:08:17 +09:00
Kohei Suzuki
136e09e704 ghc-mod browse should take care of sandboxes 2013-09-27 12:25:41 +09:00
Kohei Suzuki
67166a4d75 ghc-mod list should take care of sandboxes 2013-09-27 12:23:53 +09:00
Kazu Yamamoto
ecd4bd665d removing unnecesary code. 2013-09-21 18:45:17 +09:00
Kazu Yamamoto
a94b1a3b5a fixing tests. 2013-09-21 18:37:33 +09:00
Kazu Yamamoto
1050ea3c63 more tests. 2013-09-21 15:32:22 +09:00
Kazu Yamamoto
c78d708c1c Introducing strict getPackageDbDir. 2013-09-21 15:10:43 +09:00
Kazu Yamamoto
6bbe9e5df9 add doctest. 2013-09-20 21:10:31 +09:00
Kazu Yamamoto
5f0fcd0442 getCompilerOptions handles package-db options. 2013-09-20 17:15:41 +09:00
Kazu Yamamoto
4cfc702b79 removing unnecessary test cases. 2013-09-20 15:57:26 +09:00
Kazu Yamamoto
49791fb6ea Supporting sandbox sharing.
Braking backword compatibility of findCradle.
2013-09-20 15:48:50 +09:00
Kazu Yamamoto
a491927ef6 more tests. 2013-09-20 11:22:56 +09:00
Kazu Yamamoto
b514eebfc2 typo. 2013-09-20 10:48:51 +09:00
Kazu Yamamoto
b75d96b50a fixing tests. 2013-09-16 10:16:33 +09:00