Commit Graph

1765 Commits

Author SHA1 Message Date
Daniel Gröber
a6d3f477bc Add better handling for empty component assignments 2015-03-08 17:32:17 +01:00
Daniel Gröber
baf5cad809 Pass through --with-* options to cabal-helper 2015-03-07 19:37:19 +01:00
Daniel Gröber
85d4844a0d Improve suggestions on inconsistent assignment 2015-03-06 19:49:26 +01:00
Daniel Gröber
e23772b1ed Recache cabal-helper stuff when cabal-helper-* executable changes 2015-03-06 19:48:22 +01:00
Daniel Gröber
c05bd816e7 Add quiet option to decrease log level 2015-03-06 19:47:51 +01:00
Daniel Gröber
b9230c7e3f Another recomp bug fixed 2015-03-06 14:49:12 +01:00
Daniel Gröber
8aece59638 Add other-modules to library entrypoints 2015-03-06 14:39:54 +01:00
Daniel Gröber
c8da5b8085 Fix line endings in logging output 2015-03-06 14:04:49 +01:00
Daniel Gröber
b3b4b91ff8 Fix sloppy recompilation checking in cabal-helper-wrapper 2015-03-06 14:04:31 +01:00
Daniel Gröber
9d5ee06af8 Fix GHC 7.10-rc1 2015-03-06 14:04:16 +01:00
Daniel Gröber
1bc9706fe6 cabal-helper: don't install Cabal into the user prefix 2015-03-06 12:08:06 +01:00
Daniel Gröber
ca35e99254 Remove Cabal version sanity check from Setup.hs 2015-03-05 19:47:40 +01:00
Daniel Gröber
2151363dd6 Add back -d option to modules command 2015-03-05 19:38:18 +01:00
Kei Hibino
eb5d0fc867 Re-add output line separator global option for expand command. 2015-03-05 17:45:48 +01:00
Daniel Gröber
e0bd4c6984 Update ghc-mod.cabal maintainer field 2015-03-05 17:35:29 +01:00
Daniel Gröber
7ffded8b88 Add back LICENSE file pointing to COPYING.* 2015-03-05 17:35:29 +01:00
Daniel Gröber
8c3acd73df Update .gitignore 2015-03-05 17:35:28 +01:00
Daniel Gröber
070bf54323 Update README 2015-03-05 17:35:28 +01:00
Daniel Gröber
bee3ec35ec exe:ghc-mod: some output formatting changes 2015-03-05 17:35:28 +01:00
Daniel Gröber
01dde80385 Bring test suite up to date 2015-03-05 17:35:28 +01:00
Daniel Gröber
f0ea445a9b Cleanup errors and logging a bit 2015-03-05 17:35:28 +01:00
Daniel Gröber
bc71877dcf Change the way cabal-helper is built a bit 2015-03-05 17:35:28 +01:00
Daniel Gröber
82bb0090c0 Refactoring to use cabal-helper-wrapper
This turned out to be quite involved but save for this huge commit it's
actually quite awesome and squashes quite a few bugs and nasty
problems (hopefully). Most importantly we now have native cabal
component support without the user having to do anything to get it!

To do this we traverse imports starting from each component's
entrypoints (library modules or Main source file for executables) and
use this information to find which component's options each module will
build with. Under the assumption that these modules have to build with
every component they're used in we can now just pick one.

Quite a few internal assumptions have been invalidated by this
change. Most importantly the runGhcModT* family of cuntions now change
the current working directory to `cradleRootDir`.
2015-03-05 17:35:24 +01:00
Daniel Gröber
7438539ca5 Change primary license to AGPL-3 2015-03-03 21:09:18 +01:00
Daniel Gröber
52e3233f44 Introducing cabal-helper-wrapper
The idea here is to build cabal-helper with whatever version of Cabal
the user happens to be using (which we find by looking at
dist/setup-config) at runtime.

This way we can support literally any version of Cabal as long as the
actual cabal-helper still compiles.

I tried to only use interfaces in Cabal that have been there since at
least 1.16 so I'm hoping this shouldn't break too much.
2015-03-03 21:06:58 +01:00
Daniel Gröber
48563a435e Use crazy TemplateHaskell magic for Setup.hs backwards compatibility 2015-03-01 05:03:04 +01:00
Daniel Gröber
ef96b926c7 Use cabal-helper to support Cabal >= 1.22 with any version of ghc 2015-02-08 12:43:35 +01:00
Daniel Gröber
844bdea3db Move symbolCache to PathsAndFiles 2015-02-08 12:43:35 +01:00
Daniel Gröber
1c5a1c8b3e Add util function for finding libexec binaries 2015-02-08 12:43:35 +01:00
Daniel Gröber
405b814726 Add cabal-helper for decoding Cabal-1.22 setup-configs
.. without having to worry about Cabal version conflicts
2015-02-08 12:43:35 +01:00
Daniel Gröber
471a3ec358 Fix ghc-7.4 2015-02-08 12:43:35 +01:00
Daniel Gröber
36ed081d54 Bring test suite up to date 2015-02-08 12:43:35 +01:00
Daniel Gröber
417cacbf81 Fix finding sandbox in sandbox only projects 2015-02-08 12:43:35 +01:00
Daniel Gröber
11562b4fe7 Cleanup cabal file using extentions 2015-02-08 12:43:35 +01:00
Daniel Gröber
bc476649ed Add support for some crazy X-* fields to Setup.hs
X-Install-Target:
    Since cabal doesn't have builtin support for installing executables
    to locations other than $bindir yet this allows me to install stuff
    into $libexec or any other directory.

X-Build-Depends-Like:
    Duplicating the dependencies of the main library for every test
    suite is getting annoying this allows me to copy the final resolved
    external dependencies of a component.
2015-02-08 12:43:35 +01:00
Daniel Gröber
2b4fd77c28 Add GHC-7.10 support 2015-02-08 12:43:35 +01:00
Daniel Gröber
27c1eb1eb3 Add custom Setup.hs code to warn users about unsupported environments 2015-02-08 12:43:35 +01:00
Daniel Gröber
45d6b7d67a Guess right sandbox pkg-db path on ghc version mismatch
If cabal.sandbox.config contains a "package-db:" declaration with the
wrong path and only the ghc version is wrong, for example:

```
package-db: <DIR>/.cabal-sandbox/x86_64-linux-ghc-7.8.3-packages.conf.d
```

Even though the user is using 7.10.0.20141222 `cabal repl` will correct
this and pass

```
-package-db <DIR>/.cabal-sandbox/x86_64-linux-ghc-7.10.0.20141222-packages.conf.d
```

to ghci, so obviously Cabal/cabal-install is doing some magic.

Conflicts:
	Language/Haskell/GhcMod/PathsAndFiles.hs
2015-02-08 12:43:25 +01:00
Daniel Gröber
0eaa3d23d8 Fix documentation for root command 2015-02-07 15:22:10 +01:00
Daniel Gröber
129fe92de2 Improve error reporting for invalid command line arguments 2015-02-07 15:22:10 +01:00
Daniel Gröber
ce61f38f4d Remove a bunch of dead code 2015-01-03 00:36:12 +01:00
Daniel Gröber
f5ab347c03 Add bump.sh script to master branch too 2014-12-31 22:57:53 +01:00
Daniel Gröber
76180ca73a "modules" command was missing from ghc-mod usage 2014-12-24 22:35:21 +01:00
klapaucius
fc7ce47e93 fix for varid bug in showExports & processExports 2014-12-24 22:17:36 +01:00
Dimitri 'phaazon' Sabadie
f023f4fc06 Fixed #422. 2014-12-24 22:12:36 +01:00
Daniel Gröber
782f234981 Fix ghc-mod tempdirs not being removed on exit 2014-12-24 21:34:57 +01:00
Daniel Gröber
80e826a199 Prefix ghc-mod tmpdirs with "ghc-mod" 2014-12-24 21:34:39 +01:00
Daniel Gröber
6e6c0d99e2 Add installation note about Nix 2014-12-16 21:34:04 +01:00
Kazu Yamamoto
af7b910394 Merge pull request #409 from iquiw/master
Update extract module regexp for unicode quotes
2014-12-01 11:48:42 +09:00
Kazu Yamamoto
bf085ce8f1 Yet another fix for #405. 2014-12-01 11:44:39 +09:00