Commit Graph

14 Commits

Author SHA1 Message Date
Hamish Mackenzie
f056dd34cd
Fix the way ExeDependency is handled (#1036)
See https://github.com/input-output-hk/nix-tools/pull/101

We should look up hsPkgs.${pkg-name}.components.exe.${component-name}
instead of including the package as a dependency.

Adding `hsPkgs.${pkg-name}` a tool it is not clear which executable in the package `haskell.nix` should choose.

Haskell.nix did not deal with this well and in fact it could lead to `nix-shell` crashing.  For instance using `shellFor` to make a shell for building `haskell-language-server` with `cabal build` crashed as a dependency on `ghcide` the executable (by the `ghcide-bench` executable) caused infinite recursion.  Allowing `ghcide-bench` to correctly depend just on `components.exes.ghcide` fixes this.

This PR also includes:

* Updated materialized files built with the new nix-tools and latest index-state
* Small update to GHCJS (pins happy) to fix issue that showed up when the materialization was updated
* A fix for the infinite recursion issue when updating materialized files (by adding ghc-boot-packages-unchecked).
* Performance fix for shellFor (checks just the names of component derivations when filtering).
2021-02-12 10:45:23 +13:00
Hamish Mackenzie
cd91692380
GHC 8.10.4 (#1033)
* Adds GHC 8.10.4 support

* Drops GHC 8.8.3, 8.10.2 and 8.10.3 from CI

* Adds warning to encourage people to use less buggy ghc
2021-02-09 14:30:32 +13:00
Hamish Mackenzie
0f7c5afc41
Add ghc 8.10.3 (#980) 2021-01-11 18:47:56 +13:00
Michael Peyton Jones
738af22ce9
Move more CI to 20.09 (attempt 2) (#975)
* Update default nixpkgs to 20.09

* Move more CI to work on 20.09 by default

* IFD level 1

* Use nixpkgs 20.03 emscripten (needed for ghcjs)

* Add missing materialized files

* Add missing materialized files

* Fix for ghc 8.8 build on darwin

* Fix for ghcjs 8.8 build on darwin

* Fix hls stack test eval for ghc810220201118

* ifdLevel 2

* Oops: accidentally turned on tests for experimental GHC

* Revert "Fix hls stack test eval for ghc810220201118"

This reverts commit b405cd7ee8bd62214bd2d0a61e0317673b5bf1b5.

* ifdLevel 3

* Disable GHC 8.6.5 windows cross on nixpkgs 20.09

* Update supported GHC doc with a table

* Add emscripten comment

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-12-17 15:57:09 +00:00
Hamish Mackenzie
b611105898
Update version number of ghc8102-experimental (#927)
Sets the version number to `8.10.2.20201118` and compiler nix name to `ghc810220201118`
2020-12-07 17:19:39 +13:00
Hamish Mackenzie
cda15dc5b7
Add ghc8102-plutus as a compiler-nix-name (#848)
This change introduces a `ghc8102-experimental` compiler-nix-name that behaves much like the `ghc8102` version but includes @JoshMeredith's patch `./patches/ghc/ghc-8.10-ubxt.patch` that writes the `cg_binds` field with:

```haskell
  liftIO $ registerInterfaceDataWith "ghc/phase/core" hsc_env $ \bh ->
    putWithUserData (const $ return ()) bh (map toIfaceBind $ cg_binds cg_guts)
```

Some of the places where we used to depend on the output of `plan-to-nix` containing the correct `nix-name` for the compiler have been update to avoid using incompatible interface files from the `compiler-nix-name = "ghc8102"` version of GHC.
2020-10-21 17:04:47 +13:00
Hamish Mackenzie
316351ab3e
Add materialized files for ghc 8.8.4 (#869) 2020-10-08 17:04:02 +13:00
Hamish Mackenzie
6134e66e1d
Fix ghc 8.10 windows cross (boot with 8.6.5) (#865)
It looks like we can't use 8.8 for booting due to
https://gitlab.haskell.org/ghc/ghc/-/issues/18143

* Adds nixpkgs 20.09 to get mingw-w64 version 6
  (also needed for ghc 8.10 windows cross compile)

* Add materialization for ghc 8.10.2 windows cross

* Fix issue with harfbuzz override so it works with nixpkgs 20.09

* Fixes eval time issue for windows index-state test (turns off native-dns cabal flag for windows)

* Include exe extension for windows in coverage test

lib:ghc is still broken for ghc 8.10 (all variants), but it always has been and we should try to fix it properly, but it will be very tricky.
2020-10-07 15:42:32 +13:00
Hamish Mackenzie
c7c7d6c43a
Add ghc 8.10.2 (#807) 2020-08-11 14:26:50 +12:00
Hamish Mackenzie
cacfba0b45
Replace ghc 8.8.3 with 8.8.4 (#766)
Also adds some tooling/docs for adding new ghc versions (see `docs/adding-new-ghc.md`)
2020-07-21 14:10:23 +12:00
Hamish Mackenzie
4cac8bd00f
Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file):

* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
* Removed `./nixpkgs` directory, use  `(import ./. {}).sources`
  or `./nix/sources.nix` instead.
* Removes V1 interface for details on how to fix old code see:
    https://github.com/input-output-hk/haskell.nix/issues/709
* Removed defaultCompilerNixName.
* cabalProject, cabalProject', hackage-project and hackage-package
  now require a `compiler-nix-name` argument.
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
  New functions `p.tool` and `p.tools` (where p is a project) do not.
  Like `shellFor { tools = ... }` they will use the compiler nix name
  from the project (including stack projects where it is derived from
  the resolver).
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
  `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
  the hpack exe now).
* `haskell-nix.cabal-install` -> 
  `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

Other changes:

Adds hpack executable to the nix-tools derivations.

Adds a `cabal-hpack` test to make sure `hpack` works with
`cabalProject`.

Reduces the number of calls to `cabalProject` (particularly when
checking materialization), by giving internal tools a per-compiler
attribute.

Uses happy 1.19.12 when building newer ghc versions.

Updates cabal-install 3.2.0.0 to use the source from github that
is compatible with ghc 8.10.1.

Updates the docs for callCabalProjectToNix.

Adds a license mapping to fix a common warning.
2020-07-08 22:54:01 +12:00
Hamish Mackenzie
15fc6b3774
Add ghc 8.10.1 (#541)
* ghc 8.10
* Adds/Updates/Removes materialization files
* Disable one-shot-kqueue-on-macos patch on ghc-8.10
* Test ghc883 and ghc8101 but only with nix 20.03
* Various smaller fixes.

This should fix the infinite recursion issue with #654

Co-authored-by: Lennart Spitzner <hexagoxel@hexagoxel.de>
2020-06-07 11:05:44 +08:00
Hamish Mackenzie
79b5458138
Update materialized nix files (#603)
Update materialized with new errorHandler
2020-05-13 22:08:36 +12:00
Hamish Mackenzie
d1102d342c
Add pins and materialization for ghc-boot-packages and ghc-extra-packages (#546)
* Include `tests` in path for cross compiled tests

* Add ghc-boot-packages-nix to haskellNixRoots

* Fix naming warnings in tests sources

* Uses a single cleanGit call for all the tests

* Add memoize code for ghc-boot and ghc-extra pkgs

* Memoize ghc-boot and ghc-extra pkgs nix

* Fix release.nix being more strict than ci.nix by updating filterAttrsOnlyRecursive in ci-lib.nix

* Nicer errors when materialized path does not exist

* Updated materialization docs

* Add internalHackageIndexState to set the index-state used within haskell.nix
2020-04-20 13:27:52 +12:00