| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #118
|
|
|
|
|
|
| |
This mainly renames the program version getters to get* and make them
consistenly return Version directly. Such that wrappers like GhcVersion
have to be added at the callsites of the relevant functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
In cabal v2-build we have a similar problem. We used to assume that
plan.json's cabal-lib-version is used uniformly across units but this is
similarly untrue.
To fix both of these we re-stage the cabal version query to after
reconfiguring a unit, then we can just lookup the Cabal version in
setup-config.
Fixes #95
|
|
|
|
|
|
| |
Cabal includes the Setup.hs executable as a component in plan.json, however
there isn't a target to build it directly so we just ignore it for not when
reading unit info.
|
| |
|
|
|
|
| |
This reverts commit 04c2d34f1874bc198288d33c784bc26f89280ee2.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Stack and Cabal are likely to have different orderings here. This has
caused a difference in behaviour depending on the build-tool used
downstream in HIE so for sanity's sake just sort the list.
|
|
|
|
|
|
|
|
| |
All contributors have agreed on public record at
https://github.com/DanielG/cabal-helper/issues/76
Fixes #76
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Turns out I'm an idiot and 10eX is actually 10^(x+1).
|
| |
|
| |
|
|
|
|
| |
See https://github.com/haskell/cabal/issues/6201 for details about the bug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Seems to have been missed when it was added.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
After lamenting the fact that we don't have this in the docs I figured it
really ought to be an exposed abstraction.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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!
|
|
|
|
|
| |
We cannot always assume `takeDirectory cfg_file` will be the project source
directory!
|
|
|
|
| |
This allows discriminating Stack vs. Cabal at the type level more easily.
|
|
|
|
|
| |
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?).
|
|
|
|
|
| |
We need to support passing down the path to ghc to new-build/stack in order
to support using a non-default 'ghc' executable.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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}$.
|
| |
|
|
|
|
|
| |
Turns out the Setup header has the compiler version used to build Setup, not the
version the project is configured to use.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We will need it for the project discovery module later.
|
| |
|
| |
|
|
|
|
|
| |
This is mostly an optimization for Nix which already sets up the environment
correctly, so we should reward its users :)
|
| |
|
| |
|
|
|
|
|
| |
In turn fixes errors when building cabal-helper exe for stack projects
where the resolver uses a different ghc version than system.
|
| |
|
|
|
|
| |
[ci skip]
|
| |
|