Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: TodoMVC jsaddle exp core fixes #668

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6118bd0
Fixes for running todomvc using experimental-core2 on android
dfordivam May 18, 2020
8c396c9
Merge branch 'master' of https://github.com/reflex-frp/reflex-platform
dfordivam May 18, 2020
1c62aea
Fix sha256
dfordivam May 19, 2020
a5211ee
use batching in jsaddle
dfordivam May 22, 2020
5de5806
Bump reflex-vty to 0.1.4.0
3noch Jun 2, 2020
f722991
Bump reflex-fsnotify to 0.2.1.1
3noch Jun 4, 2020
26cc1cf
Bump all-cabal-hashes
3noch Jun 4, 2020
1dbe592
Bump android-activity to automatically detect all cores on Android de…
3noch Jun 4, 2020
b3aaf2b
Bump reflex to 0.7.1.0, reflex-dom to 0.6.0.0, reflex-ghci to rc 0.1.…
3noch Jun 9, 2020
1e019c0
Update ChangeLog for android-activity
3noch Jun 9, 2020
abe5169
Use released reflex-ghci
3noch Jun 10, 2020
c2a32f7
Merge remote-tracking branch 'origin/develop' into rc/0.6.0.0
3noch Jun 10, 2020
5ce4c6c
Temporarily disable tests for reflex-ghci
3noch Jun 10, 2020
d1e2db7
Revert "Temporarily disable tests for reflex-ghci"
3noch Jun 10, 2020
4dcafb8
Allow cacheBuildSystems to be overridden in release.nix
3noch Jun 10, 2020
60e75b2
Use branch of reflex-ghci with better tests
3noch Jun 10, 2020
df34e05
Use obsidiansystems' fork of nixpkgs instead of WebGHC's
3noch Jun 11, 2020
77a0dc6
Update reflex-ghci to include fixed tests
3noch Jun 11, 2020
b14992a
Allow thunk.nix when using scripts/hack-on
3noch Jun 12, 2020
ee154ab
Merge branch 'rc/0.6.0.0' of github.com:reflex-frp/reflex-platform in…
3noch Jun 17, 2020
93e3f48
Fix jsaddle imports
3noch Jun 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Revision history for reflex-platform

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.
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

* ([#659](https://github.com/reflex-frp/reflex-platform/pull/659)) Bump reflex-fsnotify to 0.2.1.0
* ([#658](https://github.com/reflex-frp/reflex-platform/pull/658)) Include infrastructure for WebGHC support.
* ([#658](https://github.com/reflex-frp/reflex-platform/pull/658)) Bump reflex-dom to version **UNRELEASED**.
* ([#664](https://github.com/reflex-frp/reflex-platform/pull/664)) Update GHCJS to include a critical bugfix to the `-dedupe` flag. (See [obsidiansystems/ghcjs#3](https://github.com/obsidiansystems/ghcjs/pull/3) for more information.)

* Bump
* `all-cabal-hashes` to more recent snapshot of Hackage.
* `reflex` to 0.7.1.0.
* `reflex-dom`/`reflex-dom-core` to 0.6.0.0.
* `reflex-fsnotify` to 0.2.1.1.
* `reflex-ghci` to 0.1.4.1.
* `reflex-process` to 0.3.0.0.
* `reflex-vty` to 0.1.4.0.
* `android-activity`. It now detects the number of cores on Android devices to utilize them better.

## v0.5.3.0

Expand Down
3 changes: 2 additions & 1 deletion haskell-overlays/android/dep/android-activity/default.nix
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import ((import <nixpkgs> {}).fetchFromGitHub (builtins.fromJSON (builtins.readFile ./github.json)))
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
5 changes: 3 additions & 2 deletions haskell-overlays/android/dep/android-activity/github.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"owner": "obsidiansystems",
"repo": "android-activity",
"rev": "e83e427ac01a86ca4120bbeeef2324b529cc44be",
"sha256": "05x0qqclpah2a49rlhvd1h3ibv0lv5v7lmwd5mym4r0lx3872ng7"
"private": false,
"rev": "77f4cf9000beac3d94c61f63fddb3155701bac54",
"sha256": "0asbw3r79srd7qdn5i2qcgyif5097r8w7i3k39515vb6512v8ams"
}
9 changes: 9 additions & 0 deletions haskell-overlays/android/dep/android-activity/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
27 changes: 14 additions & 13 deletions haskell-overlays/reflex-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ in
noGcTest = stdenv.hostPlatform.system != "x86_64-linux"
|| stdenv.hostPlatform != stdenv.buildPlatform
|| (ghc.isGhcjs or false);
in haskellLib.overrideCabal
in haskellLib.dontCheck (haskellLib.overrideCabal
(self.callCabal2nixWithOptions "reflex-dom-core" (reflexDomRepo + "/reflex-dom-core") (lib.concatStringsSep " " (lib.concatLists [
reflexOptimizerFlag
useTemplateHaskellFlag
Expand Down Expand Up @@ -78,7 +78,7 @@ in
preCheck = ''
export FONTCONFIG_PATH=${nixpkgs.fontconfig.out}/etc/fonts
'';
});
}));

reflex-dom = haskellLib.overrideCabal
(self.callCabal2nixWithOptions "reflex-dom" (reflexDomRepo + "/reflex-dom") (lib.concatStringsSep " " (lib.concatLists [
Expand All @@ -101,9 +101,9 @@ in
## Terminal / Conventional OS
##

reflex-vty = self.callHackage "reflex-vty" "0.1.3.0" {};
reflex-process = self.callCabal2nix "reflex-process" self._dep.reflex-process {};
reflex-fsnotify = self.callCabal2nix "reflex-fsnotify" self._dep.reflex-fsnotify {};
reflex-vty = self.callHackage "reflex-vty" "0.1.4.0" {};
reflex-process = self.callHackage "reflex-process" "0.3.0.0" {};
reflex-fsnotify = self.callHackage "reflex-fsnotify" "0.2.1.1" {};

##
## Tooling
Expand All @@ -115,11 +115,11 @@ in
## GHCJS and JSaddle
##

jsaddle = self.callCabal2nix "jsaddle" (jsaddleSrc + /jsaddle) {};
jsaddle-clib = self.callCabal2nix "jsaddle-clib" (jsaddleSrc + /jsaddle-clib) {};
jsaddle-webkit2gtk = self.callCabal2nix "jsaddle-webkit2gtk" (jsaddleSrc + /jsaddle-webkit2gtk) {};
jsaddle-webkitgtk = self.callCabal2nix "jsaddle-webkitgtk" (jsaddleSrc + /jsaddle-webkitgtk) {};
jsaddle-wkwebview = overrideCabal (self.callCabal2nix "jsaddle-wkwebview" (jsaddleSrc + /jsaddle-wkwebview) {}) (drv: {
jsaddle = self.callCabal2nix "jsaddle" (jsaddleSrc + "/jsaddle") {};
jsaddle-clib = self.callCabal2nix "jsaddle-clib" (jsaddleSrc + "/jsaddle-clib") {};
jsaddle-webkit2gtk = self.callCabal2nix "jsaddle-webkit2gtk" (jsaddleSrc + "/jsaddle-webkit2gtk") {};
jsaddle-webkitgtk = self.callCabal2nix "jsaddle-webkitgtk" (jsaddleSrc + "/jsaddle-webkitgtk") {};
jsaddle-wkwebview = overrideCabal (self.callCabal2nix "jsaddle-wkwebview" (jsaddleSrc + "/jsaddle-wkwebview") {}) (drv: {
libraryFrameworkDepends = (drv.libraryFrameworkDepends or []) ++
(if nixpkgs.stdenv.hostPlatform.useiOSPrebuilt then [
"${nixpkgs.buildPackages.darwin.xcode}/Contents/Developer/Platforms/${nixpkgs.stdenv.hostPlatform.xcodePlatform}.platform/Developer/SDKs/${nixpkgs.stdenv.hostPlatform.xcodePlatform}.sdk/System"
Expand All @@ -130,10 +130,11 @@ in
# another broken test
# phantomjs has issues with finding the right port
# jsaddle-warp = dontCheck (addTestToolDepend (self.callCabal2nix "jsaddle-warp" "${jsaddleSrc}/jsaddle-warp" {}));
jsaddle-warp = dontCheck (self.callCabal2nix "jsaddle-warp" (jsaddleSrc + /jsaddle-warp) {});
jsaddle-warp = dontCheck (self.callCabal2nix "jsaddle-warp" (jsaddleSrc + "/jsaddle-warp") {});

jsaddle-dom = self.callCabal2nix "jsaddle-dom" self._dep.jsaddle-dom {};
jsaddle-wasm = self.callCabal2nix "jsaddle-wasm" (hackGet (wasmCross + /jsaddle-wasm)) {};
jsaddle-dom = dontCheck (appendPatch (self.callCabal2nix "jsaddle-dom" self._dep.jsaddle-dom {}) ./fix-jsaddle-dom.patch);
#jsaddle-dom = self.callCabal2nix "jsaddle-dom" self._dep.jsaddle-dom {};
jsaddle-wasm = self.callCabal2nix "jsaddle-wasm" (hackGet (wasmCross + "/jsaddle-wasm")) {};
ghcjs-dom = self.callCabal2nix "ghcjs-dom" (self._dep.ghcjs-dom + "/ghcjs-dom") {};
ghcjs-dom-jsaddle = self.callCabal2nix "ghcjs-dom-jsaddle" (self._dep.ghcjs-dom + "/ghcjs-dom-jsaddle") {};
ghcjs-dom-jsffi = self.callCabal2nix "ghcjs-dom-jsffi" (self._dep.ghcjs-dom + "/ghcjs-dom-jsffi") {};
Expand Down
2 changes: 2 additions & 0 deletions haskell-overlays/reflex-packages/dep/jsaddle/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
8 changes: 5 additions & 3 deletions haskell-overlays/reflex-packages/dep/jsaddle/github.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"owner": "ghcjs",
"owner": "obsidiansystems",
"repo": "jsaddle",
"rev": "4b135448f425edf968d5058b901b57064c9d2b7a",
"sha256": "0xpsv1pp1a13vq5vk1wjj1iq0cfnq9cv7lkrv2rl6yd47slwmn2a"
"branch": "jsaddle-batching",
"private": false,
"rev": "af448aaf4c005e949196c5fb314dc4bdf4fe8519",
"sha256": "1ypsfwnz5nxmisxyqvrg681339kq60kl7g4y74dah3vfnmrg3dlw"
}
9 changes: 9 additions & 0 deletions haskell-overlays/reflex-packages/dep/jsaddle/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
2 changes: 2 additions & 0 deletions haskell-overlays/reflex-packages/dep/reflex-dom/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
7 changes: 4 additions & 3 deletions haskell-overlays/reflex-packages/dep/reflex-dom/github.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex-dom",
"branch": "develop",
"rev": "e2b846037badee035d0c466173badd1c4c474d5a",
"sha256": "12vj25zzg2xr6mvyw83skr24y30swmg79kmg7lizy3klwpv5dysc"
"branch": "eac@jsaddle-experimental-core2-changes",
"private": false,
"rev": "294ce24929b102b928203bdbc56326752a761f4a",
"sha256": "0483gbg8z0cx66w7bqk0mx5pzb47gifzy0ls4ia10ppaip6d0mhb"
}
9 changes: 9 additions & 0 deletions haskell-overlays/reflex-packages/dep/reflex-dom/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json

This file was deleted.

This file was deleted.

7 changes: 1 addition & 6 deletions haskell-overlays/reflex-packages/dep/reflex-ghci/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import ((import <nixpkgs> {}).fetchFromGitHub (
let json = builtins.fromJSON (builtins.readFile ./github.json);
in { inherit (json) owner repo rev sha256;
private = json.private or false;
}
))
import (import ./thunk.nix)
7 changes: 4 additions & 3 deletions haskell-overlays/reflex-packages/dep/reflex-ghci/github.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex-ghci",
"branch": "release/0.1.4.0",
"rev": "ea476f478da7838e9394261df7ff1f244f52b4a2",
"sha256": "1kmbp4zz61l2hbhp73dxgalnazmv32d98kmbqv27w9i8xgi2jqq8"
"branch": "develop",
"private": false,
"rev": "a97e29c391463d72c68f950d310d5ab3d0d3536f",
"sha256": "0xjdyy46j0zknd79w7m3x6gazygwznr7y907w09nbv8s88z9890l"
}
9 changes: 9 additions & 0 deletions haskell-overlays/reflex-packages/dep/reflex-ghci/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions haskell-overlays/reflex-packages/dep/reflex/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
6 changes: 3 additions & 3 deletions haskell-overlays/reflex-packages/dep/reflex/github.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex",
"branch": "master",
"branch": "release/0.7.1.0",
"private": false,
"rev": "3e81151f7d9a8b0e5d735ae2e0e438b3acc64e7b",
"sha256": "1dv1z6dwq7bx1i721rxh09crvnx909ajvg3h7rpky0d6ld1g8qr1"
"rev": "122d7361e31bbceb2cfd75df117c3bcc80673a93",
"sha256": "1kbanrqrwji1yxisj4pjv1vqcq357j2ksl03whqrksgprdmbvxnv"
}
9 changes: 9 additions & 0 deletions haskell-overlays/reflex-packages/dep/reflex/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
13 changes: 13 additions & 0 deletions haskell-overlays/reflex-packages/fix-jsaddle-dom.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/JSDOM.hs b/src/JSDOM.hs
index debdb4d..cf1deec 100644
--- a/src/JSDOM.hs
+++ b/src/JSDOM.hs
@@ -29,7 +29,7 @@ import Control.Monad.IO.Class (MonadIO(..))
import Control.Concurrent.MVar (putMVar, takeMVar)
import Language.Javascript.JSaddle.Types (JSContextRef(..))
import Language.Javascript.JSaddle.Object (freeFunction, jsg)
-import Language.Javascript.JSaddle.Monad (askJSM)
+import Language.Javascript.JSaddle.Monad
import JSDOM.Types
(Callback(..), RequestAnimationFrameCallback(..), FromJSVal(..),
MonadDOM, liftDOM, Document(..), Window(..), JSM, JSContextRef(..))
4 changes: 2 additions & 2 deletions nixpkgs-overlays/all-cabal-hashes/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
self: _: {

all-cabal-hashes = self.fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/6d2174b2bdc5aff9064795555e23ff318cb00ff6.tar.gz";
sha256 = "02qa79snhllaba3a9vrxj0j916mpirkw9m3acxvy2ijx2mmp314j";
url = https://github.com/commercialhaskell/all-cabal-hashes/archive/a47bf76d8dabd429cd50f44761a6bea8f552a93a.tar.gz;
sha256 = "126xq53kj9sxnf7si6vhr91xx7zr67371ihrpx3cm93ayyv8n25s";
};

}
11 changes: 2 additions & 9 deletions nixpkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
let
fetchFromGitHub = { owner, repo, rev, sha256, branch }:
if (builtins ? "fetchTarball")
then builtins.fetchTarball {
inherit sha256;
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
}
else (import <nixpkgs> {}).fetchFromGitHub { inherit owner repo rev; };
in import (fetchFromGitHub (builtins.fromJSON (builtins.readFile ./github.json)))
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
5 changes: 3 additions & 2 deletions nixpkgs/github.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"owner": "WebGHC",
"owner": "obsidiansystems",
"repo": "nixpkgs",
"branch": "wasm-r-p-1909-integ-2",
"branch": "reflex-platform-wasm-support",
"private": false,
"rev": "a5cc7b77c090ede3ac380962ea876b83d847592c",
"sha256": "0mfrfrgkc8bfc3hcnbzqmab021i3w27mczak99ab4ca154ml297i"
}
9 changes: 9 additions & 0 deletions nixpkgs/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
11 changes: 5 additions & 6 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

{ self-args ? { config.android_sdk.accept_license = true; }
, local-self ? import ./. self-args
, cacheBuildSystems ? [
"x86_64-linux"
# "i686-linux"
"x86_64-darwin"
]
}:

let
Expand All @@ -23,12 +28,6 @@ let
drvListToAttrs = drvs:
lib.listToAttrs (map (drv: { inherit (drv) name; value = drv; }) drvs);

cacheBuildSystems = [
"x86_64-linux"
# "i686-linux"
"x86_64-darwin"
];

perPlatform = lib.genAttrs cacheBuildSystems (system: let
getRP = args: import ./. ((self-args // { inherit system; }) // args);
reflex-platform = getRP {};
Expand Down
3 changes: 3 additions & 0 deletions scripts/hack-on
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ echo "Checking out $URL at revision $REV"
if [ -f "$REPO/default.nix" ] ; then
rm "$REPO/default.nix"
fi
if [ -f "$REPO/thunk.nix" ] ; then
rm "$REPO/thunk.nix"
fi
rm "$JSON_FILE"
rmdir "$REPO"

Expand Down