Skip to content

Commit

Permalink
Bump to latest versions of our TH libraries
Browse files Browse the repository at this point in the history
This requires bumping a lot of other deps to work with th-abstraction
0.4.
  • Loading branch information
Ericson2314 committed Jan 16, 2022
1 parent 7b2bc20 commit 60e066d
Show file tree
Hide file tree
Showing 27 changed files with 358 additions and 479 deletions.
42 changes: 42 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@

This project's release branch is `master`. This log is written from the perspective of the release branch: when changes hit `master`, they are considered released.

## Unreleased

* GHCJS 8.6 no longer uses older versions of some libraries with "text JS-string"

* `dlist`
* `ghcjs-base`
* `ghcjs-base`
* `primitive`
* `vector`
* hashable

Instead it uses the same versions as everything else.

* Bump

Intentional bumps:

* dependent-sum-template to 0.1.1.0
* some to 1.0.2

Prerequisite bumps:

* OneTuple 0.3.1
* QuickCheck 2.14.1
* aeson 1.5.4.1
* base-orphans 0.8.6
* bifunctors 5.5.11
* comonad 5.0.8
* generic-deriving 1.14.1
* hashable 1.3.5.0
* index-traversable 0.1.2
* invariant 0.5.5
* lens 4.19.2
* microlens-th 0.4.3.10
* quickcheck-instances 0.3.27
* splitmix 0.1.0.4
* strict 0.4.0.1
* tagged 0.8.6.1
* th-abstraction 0.4.3.0
* th-lift 0.8.2
* time-compat 1.9.4

## v0.9.2.0

* Bump
Expand Down
20 changes: 14 additions & 6 deletions haskell-overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ rec {
] self super;

combined-ghcjs-8_6 = self: super: foldExtensions [
ghcjs
ghcjs_8_6
(optionalExtension useTextJSString textJSString)
(optionalExtension useTextJSString textJSString-8_6)
(optionalExtension useTextJSString ghcjs-8_6-textJSString)
(optionalExtension useTextJSString ghcjs-textJSString-8_6)
(optionalExtension useFastWeak ghcjs-fast-weak_8_6)
] self super;

combined-ghcjs-8_10 = self: super: foldExtensions [
(optionalExtension useTextJSString textJSString)
(optionalExtension useTextJSString textJSString-8_10)
(optionalExtension useTextJSString ghcjs-8_10-textJSString)
(optionalExtension useTextJSString ghcjs-textJSString-8_10)
(optionalExtension useFastWeak ghcjs-fast-weak_8_10)
] self super;

Expand Down Expand Up @@ -137,22 +139,28 @@ rec {
};

# Just for GHCJS
ghcjs = import ./ghcjs.nix {
ghcjs_8_6 = import ./ghcjs-8.6 {
inherit
lib haskellLib nixpkgs fetchgit fetchFromGitHub
useReflexOptimizer
useTextJSString
enableLibraryProfiling
;
};

ghcjs-8_6-textJSString = import ./ghcjs-8.6-text-jsstring.nix {
ghcjs-textJSString-8_6 = import ./ghcjs-text-jsstring-8.6 {
inherit lib fetchgit;
};

ghcjs-8_10-textJSString = import ./ghcjs-8.10-text-jsstring.nix {
ghcjs-textJSString-8_10 = import ./ghcjs-text-jsstring-8.10 {
inherit lib fetchgit;
};

textJSString = import ./text-jsstring {
inherit lib haskellLib fetchFromGitHub versionWildcard;
inherit (nixpkgs) fetchpatch thunkSet;
};

textJSString-8_6 = import ./text-jsstring-8.6 {
inherit lib haskellLib fetchFromGitHub versionWildcard;
inherit (nixpkgs) fetchpatch thunkSet;
Expand Down
56 changes: 0 additions & 56 deletions haskell-overlays/ghcjs-8.6-text-jsstring.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{ lib, haskellLib, nixpkgs, fetchgit, fetchFromGitHub
, useReflexOptimizer
, useTextJSString
, enableLibraryProfiling
}:

with haskellLib;

self: super: {
_dep = super._dep or {} // {
ghcjsBaseSrc = fetchgit {
url = "https://github.com/ghcjs/ghcjs-base.git";
rev = "6be0e992e292db84ab42691cfb172ab7cd0e709e";
sha256 = "0nk7a01lprf40zsiph3ikwcqcdb1lghlj17c8zzhiwfmfgcc678g";
};
};

# Profiling failures seee https://github.com/ghcjs/ghcjs/issues/759
optparse-applicative = haskellLib.overrideCabal super.optparse-applicative (drv: {
broken = drv.broken or false || enableLibraryProfiling;
Expand All @@ -29,10 +22,6 @@ self: super: {
ghcLibdir = "${self.ghc.bootPackages.ghcWithPackages (p: [ p.reflex ])}/lib/${self.ghc.bootPackages.ghc.name}";
};

ghcjs-base = doJailbreak (dontCheck (self.callCabal2nix "ghcjs-base" self._dep.ghcjsBaseSrc {}));
# ghcjs-base needs an older version than nixpkgs provides.
primitive = self.callHackage "primitive" "0.6.4.0" {};

ghc = if !(lib.versionAtLeast super.ghc.ghcVersion "8.2") then super.ghc else super.ghc.overrideAttrs (_: {
# TODO: I don't think this is needed except for maybe the fast-weak patch, but doing this to preserve hashes.
phases = [ "unpackPhase" "patchPhase" "buildPhase" ];
Expand Down Expand Up @@ -77,4 +66,9 @@ self: super: {

# Cross fix is working for iOS but not JS for some reason
cabal-macosx = null;

# When we don't use text-jsstring, we hit cabal version too new issue.
ghcjs-base = if useTextJSString
then super.ghcjs-base
else appendPatch super.ghcjs-base ./ghcjs-base-cabal-version.patch;
}
10 changes: 10 additions & 0 deletions haskell-overlays/ghcjs-8.6/ghcjs-base-cabal-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/ghcjs-base.cabal b/ghcjs-base.cabal
index 7012e61..c314726 100644
--- a/ghcjs-base.cabal
+++ b/ghcjs-base.cabal
@@ -1,4 +1,4 @@
-cabal-version: 3.0
+cabal-version: 2.0
name: ghcjs-base
version: 0.2.0.3
synopsis: base library for GHCJS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ self: super: {
rev = "126174753ea8e5f45df8fcbba609e3f1c453bf27";
sha256 = "0l7nbln2w77s12fm4ybhi0jsfnxkyiwskfx3b682pfisa6n32rgm";
};
ghcjsBaseTextJSStringSrc = super.ghcjs-base.src.overrideAttrs (drv: {
outputHash = "1pdxlb67f94bl2b6k0m4flpjbf07g7fgqbyjnki4y57a5r0iympd";
postFetch = (drv.postFetch or "") + ''
( cd $out
patch -p1 < ${./ghcjs-base-text-jsstring.patch}
)
'';
});
};

ghc = super.ghc.overrideAttrs (drv: {
Expand Down
48 changes: 48 additions & 0 deletions haskell-overlays/ghcjs-text-jsstring-8.6/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ lib, fetchgit }:

self: super: {
_dep = super._dep or {} // {
textSrc = fetchgit {
url = "https://github.com/obsidiansystems/text.git";
rev = "50076be0262203f0d2afdd0b190a341878a08e21";
sha256 = "1vy7a81b1vcbfhv7l3m7p4hx365ss13mzbzkjn9751bn4n7x2ydd";
};
ghcjsBaseTextJSStringSrc = super.ghcjs-base.src.overrideAttrs (drv: {
outputHash = "1pdxlb67f94bl2b6k0m4flpjbf07g7fgqbyjnki4y57a5r0iympd";
postFetch = (drv.postFetch or "") + ''
( cd $out
patch -p1 < ${./ghcjs-base-text-jsstring.patch}
)
'';
});
};

ghc = super.ghc.overrideAttrs (drv: {
postUnpack = ''
set -x
(
echo $sourceRoot
cd $sourceRoot
rm -r lib/boot/pkg/text
cp --no-preserve=mode -r "${self._dep.textSrc}" lib/boot/pkg/text
cp --no-preserve=mode -r "${self._dep.ghcjsBaseTextJSStringSrc}" lib/boot/pkg/ghcjs-base
unpackFile ${super.dlist.src}
chmod +w dlist-*
mv dlist-* lib/boot/pkg/dlist
unpackFile ${super.vector.src}
chmod +w vector-*
mv vector-* lib/boot/pkg/vector
unpackFile ${super.primitive.src}
chmod +w primitive-*
mv primitive-* lib/boot/pkg/primitive
sed -i 's/.\/pkg\/mtl/.\/pkg\/mtl\n - .\/pkg\/ghcjs-base\n - .\/pkg\/dlist\n - .\/pkg\/primitive\n - .\/pkg\/vector/' lib/boot/boot.yaml
cat lib/boot/boot.yaml
)
'';
});

dlist = null;
ghcjs-base = null;
primitive = null;
vector = null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,30 +375,32 @@ index 4a64694..acf8806 100644
JavaScript.TypedArray.Internal.Types
JavaScript.TypedArray.ArrayBuffer.Internal
JavaScript.TypedArray.DataView.Internal
@@ -128,48 +128,48 @@ library
@@ -144,15 +144,15 @@ library
integer-gmp,
binary >= 0.8 && < 0.11,
bytestring >= 0.10 && < 0.11,
- text >= 1.1 && < 1.3,
- aeson >= 0.8 && < 1.5,
- aeson >= 0.8 && < 1.6,
- scientific >= 0.3 && < 0.4,
+ -- text >= 1.1 && < 1.3,
+ -- aeson >= 0.8 && < 1.5,
+ -- aeson >= 0.8 && < 1.6,
+ -- scientific >= 0.3 && < 0.4,
vector >= 0.10 && < 0.13,
containers >= 0.5 && < 0.7,
time >= 1.5 && < 1.9,
- hashable >= 1.2 && < 1.3,
time >= 1.5 && < 1.10,
- hashable >= 1.2 && < 1.4,
- unordered-containers >= 0.2 && < 0.3,
- attoparsec >= 0.11 && < 0.14,
+ -- hashable >= 1.2 && < 1.3,
- attoparsec >= 0.11 && < 0.15,
+ -- hashable >= 1.2 && < 1.4,
+ -- unordered-containers >= 0.2 && < 0.3,
+ -- attoparsec >= 0.11 && < 0.14,
+ -- attoparsec >= 0.11 && < 0.15,
transformers >= 0.3 && < 0.6,
primitive >= 0.5 && < 0.7,
primitive >= 0.5 && < 0.8,
deepseq >= 1.3 && < 1.5,
dlist >= 0.7 && < 0.9

@@ -161,37 +161,37 @@ library
if !impl(ghcjs) && !os(ghcjs)
buildable: False

-test-suite tests
- type: exitcode-stdio-1.0
- hs-source-dirs: test
Expand Down Expand Up @@ -430,6 +432,9 @@ index 4a64694..acf8806 100644
- test-framework >= 0.4,
- test-framework-hunit >= 0.2,
- test-framework-quickcheck2 >= 0.2
- default-language: Haskell2010
- if !impl(ghcjs) && !os(ghcjs)
- buildable: False
+-- test-suite tests
+-- type: exitcode-stdio-1.0
+-- hs-source-dirs: test
Expand Down Expand Up @@ -461,3 +466,6 @@ index 4a64694..acf8806 100644
+-- test-framework >= 0.4,
+-- test-framework-hunit >= 0.2,
+-- test-framework-quickcheck2 >= 0.2
+-- default-language: Haskell2010
+-- if !impl(ghcjs) && !os(ghcjs)
+-- buildable: False
Loading

0 comments on commit 60e066d

Please sign in to comment.