aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix building with Cabal-3.2.0.0Daniel Gröber2020-04-181-1/+1
|
* Fix datestamp Cabal HEAD version being too longDaniel Gröber2020-04-181-14/+3
| | | | | | | Cabal's versionDigitParser limits the version nuber to nine digits, this used to not be checked for and used to just overflow the resulting Word. See 7d4eee68fcb3 ("Limit version number parts to be 9 digits")
* Revert "Fix Cabal version selection for Stack (esp. build-type:Custom)"Daniel Gröber2020-02-112-17/+8
| | | | This reverts commit 04c2d34f1874bc198288d33c784bc26f89280ee2.
* Fix patchBuildToolProgs when haddock cannot be foundJavier Neira2020-02-102-8/+13
| | | | Cabal's GHC.configure doesn't demand haddock exist, so we have to handle the case where it's not installed.
* Fix invokeGhc when using relative pathsDaniel Gröber2020-01-111-4/+8
|
* Fix Cabal version selection for Stack (esp. build-type:Custom)Daniel Gröber2020-01-112-8/+17
| | | | | | Previously we would pick up Stack's Cabal version with ghc-pkg on the global package-db. This however ignores that Stack also supports custom Setup.hs with the Cabal version from the snapshot instead.
* Unset GHC_ENVIRONMENT and GHC_PACKAGE_PATH before invocing GHCDaniel Gröber2020-01-113-19/+20
| | | | | | | | | | | | When we are invoked under Stack (as part of HIE's test suite for example) our choice of Cabal library when invoking GHC gets interferred with by the GHC_ENVIRONMENT variable. Since we're just using boot packages simply unsetting GHC package related envvars seems like a fairly decent fix here. See the issue below for more details. Fixes #78
* ghc-session: Get GHC libdir from --print-libdir commandDaniel Gröber2019-12-291-0/+4
| | | | | | Using ghc-paths bypasses cabal's rebuild checks though, for example, installing the compiler into a different directory will change the libdir but cabal won't recompile ghc-paths.
* Fix Cabal HEADDaniel Gröber2019-12-292-11/+13
|
* Explicitly state package in componentLuke Lau2019-11-271-2/+2
| | | | | | | This fixes scenarios such as: cabal: Ambiguous target 'test:foo'. It could be: A:test:foo (component) B:test:foo (component)
* Change license to Apache2Daniel Gröber2019-09-2919-203/+108
| | | | | | | | All contributors have agreed on public record at https://github.com/DanielG/cabal-helper/issues/76 Fixes #76
* Add support for symlink farming as a workaround for StackDaniel Gröber2019-09-293-1/+114
| | | | | | | | We want to be able to have the build tool use exactly the compiler and related executables we choose. Stack doesn't really like that mode of operation and insists on getting everything from PATH itself so this commit adds support for creating a temporary symlink farm to convince Stack to use the executables we want it to use.
* Remove Compat.ProgramDb moduleDaniel Gröber2019-09-291-31/+0
|
* Remove redundant timing code for compileHelperDaniel Gröber2019-09-171-6/+0
|
* Use plStackProjectDir instead of 'takeDirectory stack_yaml'Daniel Gröber2019-09-171-4/+4
|
* Fix some warningsDaniel Gröber2019-09-171-1/+0
|
* Update some code docsDaniel Gröber2019-09-172-13/+24
|
* Remove pretty-show dependencyDaniel Gröber2019-09-171-2/+1
| | | | It's a bit heavy just for a single use-site for debugging.
* Fix "Installing lib:Cabal" messageDaniel Gröber2019-09-171-1/+1
|
* Implement cabal v2 backpack unit workaroundDaniel Gröber2019-09-172-7/+35
| | | | See https://github.com/haskell/cabal/issues/6201 for details about the bug
* Make caching more fine grainedDaniel Gröber2019-09-171-9/+63
| | | | | | | | | | | | | | | | | Previously we only had a cache for the project info and each unit info. However adding support for passing overridden compiler paths to build tools introduces a nasty data dependency: to fully configure 'Program's we (used to) need ProjInfo which needs an already configured 'Programs' in readProjInfo (ugh). After at least four failed attempts at untangling this I arrived at this solution. Simply splitting up the caches into some smaller parts does the trick and as a side product forced me to add an abstraction for the caching logic so as to not reapeat myself even more. Relatedly runQuery is not just a field accessor anymore but actualy does some IO of itself to manage the cache and make already configured 'Program's available to the rest of the library.
* Add verbose logging support for readProcess callsDaniel Gröber2019-09-171-11/+24
|
* Fix some import warningsDaniel Gröber2019-09-172-2/+0
|
* Break cycle between 'Package' and 'Unit'Daniel Gröber2019-09-173-5/+9
|
* Add exported interface for running build-toolsDaniel Gröber2019-09-174-12/+71
|
* Refine ProjLoc docsDaniel Gröber2019-09-171-18/+21
|
* Introduce Package abstractonDaniel Gröber2019-09-173-61/+90
| | | | | After lamenting the fact that we don't have this in the docs I figured it really ought to be an exposed abstraction.
* Make ChSetupEntrypoint carry the Main module file nameDaniel Gröber2019-09-171-0/+2
|
* Remove crusty old helper codeDaniel Gröber2019-09-174-343/+42
| | | | | | | | | | | | - Inplace component inlining really always was a nasty cludge, now that we have proper build-system support we can get rid of it. - GHC options subsets aren't really needed, we can split these up after parsing the options using the ghc library. - Dropped GHC 7.10, it seems unsupportable without the inplace component inlining, possibly a Stack/lib:Cabal bug, but it is quite old so time for it to go anyway. This is the second thing commit it was holing up too!
* Fix ProjLoc to source directory correspondenceDaniel Gröber2019-09-171-1/+11
| | | | | We cannot always assume `takeDirectory cfg_file` will be the project source directory!
* Refactor ProjType to be more inductiveDaniel Gröber2019-09-172-22/+30
| | | | This allows discriminating Stack vs. Cabal at the type level more easily.
* Allow passing override-env to process functionsDaniel Gröber2019-09-176-27/+43
| | | | | Unfortunately we need this to pass a custom GHC executable path to stack, since it doesn't have an option to override it on the commandline (yet?).
* Merge CompPrograms back into ProgramsDaniel Gröber2019-09-174-34/+23
| | | | | We need to support passing down the path to ghc to new-build/stack in order to support using a non-default 'ghc' executable.
* Add TODO about user-ghc-environment supportDaniel Gröber2019-09-171-0/+5
|
* Flesh out project discovery APIDaniel Gröber2019-09-173-31/+14
|
* Fix some warningsDaniel Gröber2019-09-174-8/+8
| | | | | | | | | I'm turning off -Wunused-imports in the modules that have to deal with ancient Cabal versions because maintaining warning cleanlyness really is quite pointless when you have to deal with all sorts of deprecations and stuff moving around. I don't think having too many imports will ever break anything there unless the modules really get deprecated and removed, but we'll notice that ;)
* Update API docs of main typesDaniel Gröber2019-09-171-27/+93
|
* Split SProjType along build-tool lineDaniel Gröber2019-09-171-22/+37
| | | | | | | This makes it much easier to deal with differences between the build tools as we can now have functions that only make sense for Cabal and statically enforce this by passing a 'SCabalProjType pt' as evidence that $pt \in {V1, V2}$.
* Support cabal-file not being in pkgdir with cabal-v1Daniel Gröber2019-09-171-3/+3
|
* Fix RelativePath invariantsDaniel Gröber2019-09-171-6/+22
| | | | | | | | | | Two things were broken here: - I forgot to encode the invariant that RealtivePath should not be allowed to escape CWD by using '../' - The invaiant was inverted. A RelativePath was only allowed to be absolute before -- uups.
* Start implementing Distribution.Helper.DiscoverZubin Duggal2019-09-171-0/+26
|
* Fix Cabal HEADZubin Duggal2019-07-291-4/+1
|
* Fix redundant case warningDaniel Gröber2019-06-191-1/+0
|
* Revert compilerVersion being project-scopeDaniel Gröber2019-05-271-2/+4
| | | | | Turns out the Setup header has the compiler version used to build Setup, not the version the project is configured to use.
* Fix QueryEnv not being compatible with ExDaniel Gröber2019-05-051-2/+1
|
* Fix Haddock parse errorDaniel Gröber2019-05-021-2/+2
|
* Add ProjLocV1Dir for easier forward portingDaniel Gröber2019-04-011-2/+8
|
* Make compilerVersion accessor project-scope for V1 projectsDaniel Gröber2019-04-014-24/+62
|
* Fix datecode padding in unpackCabalHEADDaniel Gröber2019-04-011-1/+2
|
* Don't insist on an odd major version in unpackCabalHEADDaniel Gröber2019-04-011-3/+4
| | | | Super-major version bumps like Cabal-2.5.0.0 -> Cabal-3.0.0.0 violate that rule.