aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* ci: Update cabal versionsDaniel Gröber2021-02-141-0/+2
|
* Use existing functions to handle .exejneira2020-05-201-8/+5
|
* Fix programs-test in windowsjneira2020-05-201-7/+17
|
* Refactor Program versions handlingDaniel Gröber2020-05-102-22/+14
| | | | | | 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.
* Only pass pjUnits to compile module instead of whole PlanJsonDaniel Gröber2020-05-021-1/+1
|
* Fix Cabal version selection for build-type:CustomDaniel Gröber2020-05-027-11/+56
| | | | | | | | | | | | | | | | 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
* Move CabalVersion and related types into a new moduleDaniel Gröber2020-05-021-0/+1
|
* ghc-session: Fix stackBuiltinCabalVersion when snapshot-db has CabalDaniel Gröber2020-05-021-1/+1
| | | | | | | Stackage can get into the situation where they have a different Cabal version from what was shipped with GHC. This is usually not a problem but when stack installs any package with build-type:custom this pulls in the Stackage Cabal version!
* Fix cabal projects using source-repository-packageDaniel Gröber2020-05-026-10/+47
| | | | | | | | | | | Apparently we can get source-repo-packages in plan.json even when filtering for `"style": "local"`(`UnitTypeLocal`). It's possible the root cause here is a cabal bug as source-repository-package should really be treated more like a tarball than a local package. Regardless we simply filter units by actually checking for `uPkgSrc=Just LocalUnpackedPackage` instead of relying on "style". This fixes #99
* Support GHC 8.10jneira2020-05-011-1/+3
|
* Update test dataDaniel Gröber2020-04-182-1/+4
|
* Revert "Fix Cabal version selection for Stack (esp. build-type:Custom)"Daniel Gröber2020-02-111-3/+3
| | | | This reverts commit 04c2d34f1874bc198288d33c784bc26f89280ee2.
* Fix Cabal version selection for Stack (esp. build-type:Custom)Daniel Gröber2020-01-111-3/+3
| | | | | | 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.
* Update stack-resolversDaniel Gröber2020-01-111-1/+1
|
* ghc-session: Get GHC libdir from --print-libdir commandDaniel Gröber2019-12-291-6/+7
| | | | | | 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 unused argument warningDaniel Gröber2019-12-291-4/+4
|
* compile-test: Add program commandline optionsDaniel Gröber2019-12-293-28/+40
|
* Add GHC 8.8 supportDaniel Gröber2019-12-291-0/+1
|
* Update stack-resolversDaniel Gröber2019-12-281-1/+1
|
* Update stack-resolversDaniel Gröber2019-12-271-1/+1
|
* Add support for symlink farming as a workaround for StackDaniel Gröber2019-09-291-0/+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.
* ghc-session: Remove "stack not installed by CI scripts" errorDaniel Gröber2019-09-291-7/+1
| | | | | We include the correct stack version in the CI images now and since the relevant stack version is now released it is easy to install for devs.
* ghc-session: Fix verbosity functionsDaniel Gröber2019-09-171-2/+2
|
* Implement cabal v2 backpack unit workaroundDaniel Gröber2019-09-171-3/+2
| | | | See https://github.com/haskell/cabal/issues/6201 for details about the bug
* ci: Update version listsDaniel Gröber2019-09-172-1/+3
|
* Make caching more fine grainedDaniel Gröber2019-09-171-1/+1
| | | | | | | | | | | | | | | | | 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.
* ghc-session: Use new project building APIDaniel Gröber2019-09-171-19/+4
| | | | | | | | | | | | | | One caveat: psiConfigure used to --only-configure the entire project. In theory we shouldn't even need to do that anymore because we reconfigure just the unit/target we need to before reading unit info. However cabal has a bug or well they might consider it just inconsistent behaviour in that instantiated backpack units' targets are not built by the target mentioned in plan.json so this per-unit reconfigure is currently broken there. The workaround is to just build the entire project before running a query for now.
* Add exported interface for running build-toolsDaniel Gröber2019-09-171-1/+1
|
* Introduce Package abstractonDaniel Gröber2019-09-171-2/+2
| | | | | 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-4/+2
|
* Remove crusty old helper codeDaniel Gröber2019-09-171-13/+13
| | | | | | | | | | | | - 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/+1
| | | | | We cannot always assume `takeDirectory cfg_file` will be the project source directory!
* Refactor ProjType to be more inductiveDaniel Gröber2019-09-171-9/+9
| | | | This allows discriminating Stack vs. Cabal at the type level more easily.
* Allow passing override-env to process functionsDaniel Gröber2019-09-171-2/+2
| | | | | 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-172-13/+9
| | | | | We need to support passing down the path to ghc to new-build/stack in order to support using a non-default 'ghc' executable.
* ghc-session: Print test-spec in test-resultsDaniel Gröber2019-09-171-10/+22
|
* ghc-session: Output test specs of tests being runDaniel Gröber2019-09-171-2/+18
| | | | | The strings under the "Going to Run These Tests" heading can be plugged right back into the commandline to run just that test.
* ghc-session: Add GHC version match checkDaniel Gröber2019-09-171-1/+6
|
* Split SProjType along build-tool lineDaniel Gröber2019-09-172-5/+5
| | | | | | | 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-1/+1
|
* ghc-session: Allow overriding programs on commandlineDaniel Gröber2019-09-171-57/+104
|
* compile-test: Read cabal versions from fileDaniel Gröber2019-06-192-49/+72
| | | | | This allows them to be checked for up-to-date'nes in CI like the stack-resolvers.
* ghc-session: Improve test output consistencyDaniel Gröber2019-06-191-29/+61
|
* ghc-session: Simplify Cabal version checkingDaniel Gröber2019-06-191-12/+12
|
* ci: Move stack resolver table to a fileDaniel Gröber2019-06-192-12/+19
|
* Add ProjLocV1Dir for easier forward portingDaniel Gröber2019-04-011-1/+1
|
* Promote 'Ex' to exported APIDaniel Gröber2019-03-311-2/+0
| | | | We will need it for the project discovery module later.
* Add accessor for ChModuleName newtypeDaniel Gröber2019-03-291-3/+0
|
* Some helper compilation test coverage commentsDaniel Gröber2019-02-112-1/+11
| | | | [ci skip]
* ghc-session: Get correct builtin Cabal version per proj-typeDaniel Gröber2019-02-111-48/+89
|