Commit Graph

767 Commits

Author SHA1 Message Date
Nikolay Yakimov
cdaf586941 Haddock documentation 2015-12-07 19:57:33 +03:00
Nikolay Yakimov
b2fb54a356 Fix tests, move option records to Types module 2015-12-06 00:56:19 +03:00
Nikolay Yakimov
ad16b739eb Optparse-applicative 2015-12-05 23:55:12 +03:00
Nicolas Rolland
bff86be69f some refactoring 2015-11-27 11:15:25 +01:00
Nicolas Rolland
e1d2de96c8 fixing tests for logging 2015-11-27 11:15:25 +01:00
Nicolas Rolland
1a8020774e adding Get logging level 2015-11-27 11:15:25 +01:00
Nicolas Rolland
d0ea69b61b handling logging level 2015-11-27 11:15:25 +01:00
Nicolas Rolland
06323ac20f adding logging to findCradle methods 2015-11-27 11:15:25 +01:00
Daniel Gröber
16c69b2743 Disable stack support for ghc <7.8 2015-11-26 19:21:15 +01:00
Daniel Gröber
1c0c97bdbb Typo 2015-11-26 16:31:53 +01:00
Daniel Gröber
0d97646694 Remove some redundant calls to withCabal
`chCached` already handles that
2015-11-26 16:19:50 +01:00
Daniel Gröber
412cee9abf Log exceptions in browse 2015-11-26 16:19:11 +01:00
Daniel Gröber
81a2d29cdc Fix ghc-7.4 build 2015-11-26 15:30:26 +01:00
Daniel Gröber
6f0b8b00d1 Add some missing copyright boilerplate 2015-11-26 15:03:14 +01:00
Daniel Gröber
4963b782d9 Don't fiddle with state in resolvedComps cacheAction
The general in-memory caching that was added to `cached` handles that
now making this fiddly workaround redundant.
2015-11-26 14:52:25 +01:00
Daniel Gröber
a12a7fabc0 Invalidate components cache when setup-config changed (Fix #684) 2015-11-26 14:52:25 +01:00
Daniel Gröber
604f2c18b0 Fix upper bounds on binary for ghc<7.10 2015-11-26 14:52:25 +01:00
Daniel Gröber
8568a6785c Check for in-memory cache invalidation (Fix #683) 2015-11-18 21:41:19 +01:00
Daniel Gröber
82f33cdbd7 Add modtime to on-disk and memory cache 2015-11-18 20:58:29 +01:00
Daniel Gröber
0c3587f388 Typo 2015-11-18 20:54:12 +01:00
Daniel Gröber
b923e2662d Switch to using binary instead of cereal. 2015-11-18 20:51:37 +01:00
Daniel Gröber
ca2992d83c Remove redundant constraint from runGhcModT 2015-10-29 18:52:51 +01:00
Daniel Gröber
6b2246ebd6 Dead code be gone 2015-09-30 11:27:19 +02:00
Daniel Gröber
19b3de3569 Preserve cabal flags when reconfiguring project 2015-09-24 05:27:20 +02:00
Daniel Gröber
2549bba7b8 Fix yesterday's fix
we were invoking cabal-helper too early
2015-09-24 04:49:49 +02:00
Nikolay Yakimov
0d42b66fc3 Fix logging for file mapping when temp dir is proj. root subdir 2015-09-24 03:20:07 +02:00
Daniel Gröber
df455a3618 Fix missing autogen files when dist/setup-config already exists (Issue #621) 2015-09-23 12:02:03 +02:00
Daniel Gröber
0fde762500 Fix ghc<7.10 2015-09-16 05:40:53 +02:00
Daniel Gröber
46891f13ee Fix #603, stack path output can have missing values 2015-09-16 05:18:53 +02:00
Daniel Gröber
24050e5af3 Fix warnings 2015-09-16 05:18:44 +02:00
Daniel Gröber
380acdaee0 Only use debugLogger when loglevel >= GmDebug 2015-09-16 05:13:20 +02:00
Daniel Gröber
413bac085d Fix sharing stdout Chan with multiple threads 2015-09-16 05:13:20 +02:00
Daniel Gröber
7e565df923 Fix stdoutGateway line buffering 2015-09-16 05:13:20 +02:00
Daniel Gröber
2c0d5af5e9 Fix warnings 2015-09-16 05:13:20 +02:00
Daniel Gröber
5af2c939b3 Cleanup some dead code 2015-09-15 05:25:54 +02:00
Daniel Gröber
0b2a3458fd Move stack code into seperate module 2015-09-15 05:25:54 +02:00
Daniel Gröber
5b02cc1bb0 Make sure stdoutGateway is flushed before exiting. 2015-09-14 10:12:01 +02:00
Daniel Gröber
56902bfe2d Don't mess with cwd, causes too many race conditions
I would just fork() but we have to support WinDOS, gah.
2015-09-14 10:12:01 +02:00
Daniel Gröber
55f278853a Fix tests more 2015-09-14 07:11:45 +02:00
Daniel Gröber
ba14e1790c Fix tests 2015-09-14 05:59:38 +02:00
Daniel Gröber
4536ac545d Make sure stdoutGateway is running during findCradle' 2015-09-14 05:40:32 +02:00
Daniel Gröber
64379a7c56 Actually update world in legacyInteractiveLoop 2015-09-11 09:53:24 +02:00
Daniel Gröber
ce1d9d1da1 Fix ghc<7.10 2015-09-11 05:45:59 +02:00
Daniel Gröber
acf78f2500 Remove stray debug code 2015-09-11 03:57:54 +02:00
Daniel Gröber
211b957451 Fix race condition in stack support code 2015-09-11 03:52:28 +02:00
Daniel Gröber
12d65ba11f Fix some warnings 2015-09-11 03:52:28 +02:00
Daniel Gröber
e92bd0af48 Disable obj loading for targets (Fix #554) 2015-09-10 07:48:13 +02:00
Daniel Gröber
6ad71af001 Don't swallow ghc's verbose output 2015-09-08 06:44:02 +02:00
Daniel Gröber
dbf215a35b Fix tests, this time, this time for sure. 2015-09-08 06:42:32 +02:00
Daniel Gröber
34fedd8ad3 Missing source file 2015-09-08 06:19:58 +02:00
Daniel Gröber
d400c8f389 Fix missing makeAbsolute 2015-09-08 05:20:26 +02:00
Daniel Gröber
f06511bff1 Support multi-package stack projects 2015-09-08 03:54:29 +02:00
Daniel Gröber
5713fd9908 Fix custom package-db stack for non Cabal projects 2015-09-07 07:20:16 +02:00
Daniel Gröber
be293db503 Update for cabal-helper >= 0.6 2015-09-07 05:15:35 +02:00
Daniel Gröber
8fea4ac426 Fix doc command not using right ghc-pkg exe 2015-09-02 07:19:11 +02:00
Daniel Gröber
86c157d1d2 Add some more debug output 2015-09-02 05:30:00 +02:00
Daniel Gröber
996016ac7b Fix wrong stack version lower bound in log message 2015-09-02 05:02:13 +02:00
Daniel Gröber
a8c111cda3 Write cabal_macros.h on reconfigure when using stack 2015-09-02 04:57:25 +02:00
Daniel Gröber
82c5069cd8 Fix doctest 2015-09-02 04:00:30 +02:00
Daniel Gröber
a0a7433212 Fix <7.10 2015-09-01 10:45:15 +02:00
Daniel Gröber
41de8b8b2e Sandwich new Monad layer GmOutT into transformer stack
This way we can have access to some options pre Cradle setup which
should fix the output interleaving problems I was observing.
2015-09-01 10:32:27 +02:00
Daniel Gröber
2af1da960b Also catch exceptions thrown in IO 2015-09-01 10:29:21 +02:00
Daniel Gröber
899d583549 error -> throw $ GMEProcess 2015-09-01 10:27:41 +02:00
Daniel Gröber
4aa75818d8 Fix tests 2015-08-31 08:32:31 +02:00
Daniel Gröber
0b65487e50 Stderr output pre-GhcModT for stack cradle 2015-08-31 07:49:06 +02:00
Daniel Gröber
2a0414f368 Pass stack ghc paths down to cabal-helper 2015-08-31 04:17:33 +02:00
Daniel Gröber
85722ab6f2 Cleanup 2015-08-24 15:11:05 +02:00
Daniel Gröber
c5db06af0f Fix missing liftIO 2015-08-21 04:21:27 +02:00
Daniel Gröber
473f1e09c7 Rename withContext -> withInteractiveContext 2015-08-21 04:12:53 +02:00
Daniel Gröber
eceb34c8af Merge branch 'master' of github.com:kazu-yamamoto/ghc-mod 2015-08-21 04:12:29 +02:00
Daniel Gröber
19e62b0a6a Inhibit stack support when dist/setup-config exists 2015-08-20 08:43:36 +02:00
Kazu Yamamoto
797aef2a09 Merge remote-tracking branch 'origin/fix-loop' 2015-08-20 09:49:06 +09:00
Daniel Gröber
b25dbc2416 Merge branch 'stack-support' 2015-08-20 02:14:55 +02:00
Daniel Gröber
91f0c50b20 Merge branch 'file-redirection-2' of https://github.com/atom-haskell/ghc-mod 2015-08-20 02:10:05 +02:00
Daniel Gröber
23a48aa6c7 Use cabal-helper for stack 2015-08-19 09:18:10 +02:00
Daniel Gröber
18a8c67d39 Take sandbox cfg into account for caches 2015-08-19 09:18:10 +02:00
Daniel Gröber
78bdf86a95 Fix all the stack related things 2015-08-19 09:17:41 +02:00
scturtle
d660e7cd85 add 'StackProject' around 2015-08-19 09:17:30 +02:00
scturtle
a285b42206 Refactor the hard-coding "dist" 2015-08-19 09:17:30 +02:00
scturtle
89c3faea05 Initilize test for stack project 2015-08-19 09:17:11 +02:00
scturtle
320b404a8c Yet another try to support Stack. 2015-08-19 09:17:11 +02:00
Daniel Gröber
e360f7eb44 Fix older GHCs 2015-08-19 09:05:57 +02:00
Kazu Yamamoto
b7cea06a52 Flushing stdout to solve infinite loop (#542). 2015-08-19 15:02:00 +09:00
Alan Zimmerman
e198f68f2a Rearrange loadTargets code.
The loadTargets function is exposed via the Internal module for use by
external programmes, such as HaRe.

Re-arrange to code so that it can still be called with a list of string
targets, as it was before.
2015-08-19 03:34:01 +02:00
Daniel Gröber
bb3a948912 Fix over-qualified error messages (Fix #551) 2015-08-18 09:26:53 +02:00
Daniel Gröber
90b1e452e2 Some pretty printing "improvements" (hopefully) 2015-08-18 04:54:10 +02:00
Daniel Gröber
f7149ba23f Cleanup 2015-08-18 04:50:51 +02:00
Daniel Gröber
dd82cea996 Demote no-component-assignment warning to debug, Fix #552 2015-08-18 04:34:39 +02:00
Daniel Gröber
a383f46939 Fix nasty module graph caching issue
resolvedComponentsCache did not consider outgoing edges in the module
graph when computing the set of dependent files

i.e. for `A -> B, A -> C` `flatten` would give [B,C] instead of [A,B,C]
2015-08-18 04:27:02 +02:00
Anthony Cowley
78c5cea161 DeferErrors implies DeferTypedHoles in GHC >= 7.10
The Opt_DeferErrors flag should imply Opt_DeferTypedHoles. The proper
API for setting these flags that implements such implications is
unfortunately not exposed by GHC.
2015-08-17 15:14:44 -04:00
Alejandro Serrano
45f8194c0c Set -fdefer-types-holes in case split 2015-08-17 14:54:10 -04:00
Nikolay Yakimov
3dea19b270 Fix getCanonicalFileNameSafe to work on all relevant ghc versions 2015-08-17 10:39:49 +03:00
Nikolay Yakimov
0d78ee4096 getCanonicalFileNameSafe is now best-effort canonicalizatoin
Canonicalizes longest init of path possible, and appends rest verbatim
2015-08-17 08:43:34 +03:00
Daniel Gröber
1f14ff08c6 Log exceptions as GmException 2015-08-17 06:52:56 +02:00
Nikolay Yakimov
ab19da08db Removed redundant imports 2015-08-16 23:42:20 +03:00
Nikolay Yakimov
8ef8a86397 Unload mapped files before loading 2015-08-16 23:38:32 +03:00
Nikolay Yakimov
a5dae2a82d Drop memory-mapped files, since ghc doesn't play well with those
All files are now "redirected", either user-created, or created by ghc-mod itself.
2015-08-16 23:20:00 +03:00
Nikolay Yakimov
654b172f5e Add FileMapping support to HMG/preprocessFile
Post-rebase update
2015-08-16 18:22:27 +03:00
Nikolay Yakimov
d276b9bb7f Remove redundant imports 2015-08-15 21:26:33 +03:00
Nikolay Yakimov
c96abfc422 Drop loadMappedFiles and move all loading code to progMain 2015-08-15 21:18:57 +03:00
Nikolay Yakimov
a9b98e7128 [File-map] Export more user-friendly functions in public API 2015-08-15 21:08:24 +03:00
Nikolay Yakimov
72c43a9210 Rename GmPprEnv fields rs* → gpe* 2015-08-15 21:07:36 +03:00
Nikolay Yakimov
e7329a9d24 Replace redirected filenames in info. 2015-08-15 21:07:36 +03:00
Nikolay Yakimov
8f931eb928 Fix problem with fileModSummary 2015-08-15 21:07:35 +03:00
Nikolay Yakimov
c5f71933f6 Canonicalize FilePath before lookup in withMappedFile 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
438b15463e Move getCanonicalFileName(Safe) to Utils module 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
267edfebe3 Try best-guess tactic if file to be redirected doesn't exist 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
a0cf585939 Bugfix: canonicalize filename before trying to unload 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
31020c4112 Move withMappedFile to Language.Haskell.GhcMod.Utils 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
d405ce7efa Make linting work with mapped files 2015-08-15 21:06:57 +03:00
Nikolay Yakimov
5b0cca0353 Added withMappedFile utility function
Works pretty much as `withTempFile`, except looks
mapping up and uses temp. file only when necessary.
2015-08-15 21:06:57 +03:00
Nikolay Yakimov
d3b1bf125b Move reading source from stdin to frontend 2015-08-15 21:06:25 +03:00
Nikolay Yakimov
67102c92b8 Use cradleTempDir instead of getTemporaryDirectory in HMG 2015-08-15 21:02:42 +03:00
Nikolay Yakimov
de5ff87f19 Don't use infix call for type ctor 2015-08-15 20:58:45 +03:00
Nikolay Yakimov
1efacbef88 Use less generic name for reader monad/state in Logger 2015-08-15 20:58:45 +03:00
Nikolay Yakimov
2504f643e9 Replace mapped names with original ones in output 2015-08-15 20:58:45 +03:00
Nikolay Yakimov
f8a0325617 Load all mapped targets 2015-08-15 20:41:10 +03:00
Nikolay Yakimov
e70988e15f Use MaybeT instead of maybe (return Nothing) 2015-08-15 20:41:10 +03:00
Nikolay Yakimov
e72d72eb86 Workaround for GHC 7.4 bugs 2015-08-15 20:41:10 +03:00
Nikolay Yakimov
3790fca20b Initial support for file redirection
Rewrite, taking discussion into consideration
2015-08-15 20:41:10 +03:00
Daniel Gröber
585a9ef425 Fix doc in non-cabal projects
..man those non-cabal projects are really getting me down. Who uses
those anwayways ;)
2015-08-14 10:30:42 +02:00
Daniel Gröber
623cddd8ca Fix find being slow on legacy-interactive 2015-08-14 06:48:56 +02:00
Daniel Gröber
887ab3c599 Don't try to create dist/ in non cabal projects, duh 2015-08-14 06:32:20 +02:00
Daniel Gröber
55bf578b87 Put line-prefix'es on exceptions too 2015-08-14 05:57:33 +02:00
Daniel Gröber
f998c63c73 Fix prepareCabalHelper when dist/ doesn't exist yet 2015-08-14 04:28:22 +02:00
Daniel Gröber
0b5de23ac9 Wrap dumpsym in stderr mangling readProc as well just in case 2015-08-14 03:51:50 +02:00
Daniel Gröber
cbfa26eb16 Make sure cabal-helper is ready before invoking dumpsym 2015-08-14 03:48:29 +02:00
Daniel Gröber
312a8c81fb Merge branch 'HaRe' of https://github.com/alanz/ghc-mod 2015-08-13 10:17:14 +02:00
Alan Zimmerman
eafde94913 Expose functions for integration with HaRe 2015-08-13 09:49:51 +02:00
Daniel Gröber
09c3c5603c Fix missing newlines 2015-08-13 09:01:58 +02:00
Daniel Gröber
2806f702d9 Start implementing line-prefix stuff
readProcess wrapper still missing from CabalHelper
2015-08-13 06:47:12 +02:00
Daniel Gröber
443650705c Fix #532, Use first component in cabal file for dangling modules in cabal projects 2015-08-12 10:44:41 +02:00
Daniel Gröber
28f06e035d Cleanup project type handling 2015-08-12 09:25:13 +02:00
Daniel Gröber
a94d8977a9 Fix ghc-modi not working in non-cabal projects 2015-08-12 09:04:35 +02:00
Daniel Gröber
9b286cc4e1 Fix cabal-helper >= 0.5 2015-08-12 09:04:09 +02:00
Daniel Gröber
11243e5304 Add in-memory caching otherwise everything is slow 2015-08-11 07:38:25 +02:00
Daniel Gröber
05360e0660 Fix typo 2015-08-11 06:35:07 +02:00
Daniel Gröber
bad431a758 Bump cabal-helper depdendency 2015-08-10 09:07:41 +02:00
Daniel Gröber
bb22b643e9 Add version header to caches 2015-08-10 06:44:34 +02:00
Daniel Gröber
0abe1d6a53 Fix warning 2015-08-07 07:33:04 +02:00
Daniel Gröber
5fdaa6adea Merge branch 'master' of https://github.com/meditans/ghc-mod 2015-08-07 07:32:26 +02:00
Daniel Gröber
8439f12cb0 Let Cabal determine the package-db stack 2015-08-07 07:31:08 +02:00
meditans
31d85a27b4 Added logging in refine and auto handlers 2015-08-06 11:49:01 +02:00
Daniel Gröber
f61dd0a9e6 Fix re-init of ghc-modi session after environment change
Using `dropSession` instead of a weird exception cludge
2015-08-05 08:52:52 +02:00
Daniel Gröber
6e28e07ca9 Fix #507 2015-08-05 08:01:25 +02:00
Daniel Gröber
d270e92951 Clean up L.H.GM.Target debug/vomit output a bit 2015-08-05 06:16:05 +02:00
Daniel Gröber
c9b6e95a30 Add Vomit log level and dumping to disk 2015-08-03 08:09:24 +02:00
Daniel Gröber
614522644b Fix imports for ghc < 7.10 2015-08-03 07:51:23 +02:00
Daniel Gröber
6ef389a757 Merge branch 'Fix502' of https://github.com/acowley/ghc-mod 2015-08-03 05:48:15 +02:00
Daniel Gröber
84c0670fc4 docs 2015-08-03 05:47:16 +02:00