Skip to content

Commit

Permalink
Merge pull request #17 from reflex-frp/rc/0.1.4.1
Browse files Browse the repository at this point in the history
Release 0.1.4.1
  • Loading branch information
3noch authored Jun 10, 2020
2 parents ea476f4 + 4c45c57 commit e79407e
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 193 deletions.
72 changes: 36 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# This Travis job script has been generated by a script via
#
# haskell-ci 'reflex-ghci.cabal' '--output' '.travis.yml'
# haskell-ci 'reflex-ghci.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.3.20190814
# version: 0.10.2
#
version: ~> 1.0
language: c
os: linux
dist: xenial
sudo: required
git:
# whether to recursively clone submodules
submodules: false
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $HOME/.hlint
before_cache:
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
Expand All @@ -25,13 +31,15 @@ before_cache:
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $CABALHOME/packages/head.hackage
matrix:
jobs:
include:
- compiler: ghc-8.6.5
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
os: linux
before_install:
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
- WITHCOMPILER="-w $HC"
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
- HCPKG="$HC-pkg"
- unset CC
- CABAL=/opt/ghc/bin/cabal
Expand All @@ -40,29 +48,8 @@ before_install:
- TOP=$(pwd)
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
- CABAL="$CABAL -vnormal+nowrap+markoutput"
- CABAL="$CABAL -vnormal+nowrap"
- set -o pipefail
- |
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
echo 'BEGIN { state = "output"; }' >> .colorful.awk
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
echo ' if (state == "cabal") {' >> .colorful.awk
echo ' print blue($0)' >> .colorful.awk
echo ' } else {' >> .colorful.awk
echo ' print $0' >> .colorful.awk
echo ' }' >> .colorful.awk
echo '}' >> .colorful.awk
- cat .colorful.awk
- |
color_cabal_output () {
awk -f $TOP/.colorful.awk
}
- echo text | color_cabal_output
install:
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- TEST=--enable-tests
- BENCH=--enable-benchmarks
- HEADHACKAGE=false
Expand All @@ -83,6 +70,12 @@ install:
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
install:
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- |
echo "program-default-options" >> $CABALHOME/config
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
- cat $CABALHOME/config
- rm -fv cabal.project cabal.project.local cabal.project.freeze
- travis_retry ${CABAL} v2-update -v
Expand All @@ -91,20 +84,22 @@ install:
- touch cabal.project
- |
echo "packages: ." >> cabal.project
- echo 'package reflex-ghci' >> cabal.project
- "echo ' ghc-options: -Werror=missing-methods' >> cabal.project"
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(reflex-ghci)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
- rm cabal.project.freeze
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
script:
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
# Packaging...
- ${CABAL} v2-sdist all | color_cabal_output
- ${CABAL} v2-sdist all
# Unpacking...
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
Expand All @@ -116,23 +111,28 @@ script:
- touch cabal.project
- |
echo "packages: ${PKGDIR_reflex_ghci}" >> cabal.project
- echo 'package reflex-ghci' >> cabal.project
- "echo ' ghc-options: -Werror=missing-methods' >> cabal.project"
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(reflex-ghci)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true
- cat cabal.project.local || true
# Building...
# this builds all libraries and executables (without tests/benchmarks)
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
# Building with tests and benchmarks...
# build & run tests, build benchmarks
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
# Testing...
- export PATH="$(dirname "$HC"):$PATH" # MANUAL ADDITION
- (cd ${PKGDIR_reflex_ghci} && ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all) # MANUAL MODIFICATION
# cabal check...
- (cd ${PKGDIR_reflex_ghci} && ${CABAL} -vnormal check)
# haddock...
- ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
# Building without installed constraints for packages in global-db...
- rm -f cabal.project.local
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all

# REGENDATA ["reflex-ghci.cabal","--output",".travis.yml"]
# REGENDATA ("0.10.2",["reflex-ghci.cabal"])
# EOF
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Revision history for reflex-ghci

## 0.1.4.1

* Library: Require at least version 0.7.1 of `reflex`.
* Library: Require at least version 0.3 of `reflex-process`.
* Library: Expand version bounds for `regex-tdfa` and `vty`.
* Tests: Include test fixtures in sdist.
* Tests: Fix some bugs.

## 0.1.4.0

* Library: Export `shutdown` and `getExitEvent` to make it easier for library users to cleanly exit
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ This package includes a [reflex-vty](https://github.com/reflex-frp/reflex-vty)-b

```bash
$ reflex-ghci -h
Welcome to reflex-ghci!
Welcome to reflex-ghci 0.1.4.0

Usage: <interactive> [-c|--command COMMAND] [-e|--expression EXPR]
Usage: reflex-ghci [-c|--command COMMAND] [-e|--expression EXPR]
Run a Haskell REPL that automatically reloads when source files change.

Available options:
-c,--command COMMAND The ghci/cabal repl command to
run (default: "cabal repl")
run (default: "cabal repl --repl-options=-Wall")
-e,--expression EXPR The optional expression to evaluate once modules have
successfully loaded (default: no expression)
successfully loaded
-h,--help Show this help text

```

Acknowledgements
Expand Down
41 changes: 11 additions & 30 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
{ mkDerivation, base, bytestring, dependent-sum, directory
, filepath, fsnotify, mtl, optparse-applicative, primitive, process
, ref-tf, reflex, reflex-fsnotify, reflex-process, reflex-vty
, regex-tdfa, stdenv, temporary, text, unix, vty, which
, ghc
}:
mkDerivation {
pname = "reflex-ghci";
version = "0.1.4.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base bytestring directory filepath fsnotify process reflex
reflex-fsnotify reflex-process reflex-vty regex-tdfa text unix vty
];
executableHaskellDepends = [
base optparse-applicative process reflex reflex-process reflex-vty
text vty
];
testHaskellDepends = [
base bytestring dependent-sum directory mtl primitive process
ref-tf reflex reflex-process reflex-vty temporary text which
];
testToolDepends = [
ghc
];
description = "A GHCi widget library for use in reflex applications";
license = stdenv.lib.licenses.bsd3;
}
{ callCabal2nix }:
let
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
"release.nix"
".git"
"dist"
"dist-newstyle"
"cabal.project"
".travis.yml"
])) ./.;
in callCabal2nix "reflex-ghci" src {}
22 changes: 12 additions & 10 deletions reflex-ghci.cabal
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cabal-version: >=1.10
cabal-version: 2.4
name: reflex-ghci
version: 0.1.4.0
version: 0.1.4.1
synopsis: A GHCi widget library for use in reflex applications
description:
Run GHCi from within a reflex application and interact with it using a functional-reactive interface.
.
<<https://i.imgur.com/5y61Qx7.png>>
.
bug-reports: https://github.com/reflex-frp/reflex-ghci/issues
license: BSD3
license: BSD-3-Clause
license-file: LICENSE
author: Obsidian Systems LLC
maintainer: [email protected]
Expand All @@ -18,6 +18,8 @@ build-type: Simple
extra-source-files: ChangeLog.md
README.md
screenshot.png
tests/**/*.hs
tests/**/*.cabal
tested-with: GHC ==8.6.5

library
Expand All @@ -31,14 +33,14 @@ library
, filepath >= 1.4 && < 1.5
, fsnotify >= 0.3 && < 0.4
, process >= 1.6 && < 1.7
, reflex >= 0.6.3 && < 0.7
, reflex >= 0.7.1.0 && < 0.8
, reflex-fsnotify >= 0.2 && < 0.3
, reflex-process >= 0.2.1 && < 0.3
, regex-tdfa >= 1.2.3 && < 1.3
, reflex-process >= 0.3 && < 0.4
, regex-tdfa >= 1.2.3 && < 1.4
, reflex-vty >= 0.1.3 && < 0.2
, text >= 1.2 && < 1.3
, unix >= 2.7 && < 2.8
, vty >= 5.25 && < 5.26
, vty >=5.21 && <5.29
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
Expand All @@ -50,12 +52,13 @@ executable reflex-ghci
base
, optparse-applicative >= 0.14.0 && < 0.16
, process
, reflex
, reflex >= 0.7.1.0
, reflex-ghci
, reflex-vty
, reflex-process
, text
, vty
autogen-modules: Paths_reflex_ghci
other-modules: Paths_reflex_ghci
ghc-options: -threaded -rtsopts
default-language: Haskell2010
Expand All @@ -70,7 +73,7 @@ test-suite test
, dependent-sum >= 0.6 && < 0.7
, directory
, mtl >= 2.2 && < 2.3
, primitive >= 0.6.4 && < 0.7
, primitive >= 0.6.4 && < 0.8
, process
, ref-tf >= 0.4 && < 0.5
, reflex
Expand All @@ -79,7 +82,6 @@ test-suite test
, reflex-vty
, temporary >= 1.3 && < 1.4
, text
other-modules: HeadlessHost
ghc-options: -threaded -rtsopts
default-language: Haskell2010

Expand Down
7 changes: 1 addition & 6 deletions reflex-platform/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 reflex-platform/github.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex-platform",
"branch": "aa-bump-reflex-process",
"rev": "22f8ea48c15d2be6af6808826a63c6b03eb672c8",
"sha256": "08i6wvgwcmnlnncq66hjhagk45kyiy5ldi15vfm007fvv1kgnamm"
"branch": "master",
"private": false,
"rev": "c13cb19f49c8093de4718d2aced1930128476cfa",
"sha256": "0v87ilal9355xwz8y9m0zh14pm9c0f7pqch0854kkj92ybc5l62q"
}
9 changes: 9 additions & 0 deletions reflex-platform/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
34 changes: 30 additions & 4 deletions release.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{ p ? import ./reflex-platform {}
{ reflex-platform-fun ? import ./reflex-platform
}:
let
inherit (p.nixpkgs) lib;
in p.ghc.callPackage ./. {}
(reflex-platform-fun {
haskellOverlaysPost = [
(self: super: {
reflex = self.callHackageDirect {
pkg = "reflex";
ver = "0.7.1.0";
sha256 = "0a933xz7yl931m90bbwi9akfz77q6px36grlx6wba55mn1klpn27";
} {};

reflex-fsnotify = self.callHackageDirect {
pkg = "reflex-fsnotify";
ver = "0.2.1.1";
sha256 = "1snbvf8z942fpb0r5spaxcdc036v6b1akgdscpfghz81bdvcxy8i";
} {};

reflex-process = self.callHackageDirect {
pkg = "reflex-process";
ver = "0.3.0.0";
sha256 = "0xx8gzs7c60zh8rj794hyisljp0gwb26m34ns8z9xgp1k8jgkdgj";
} {};

reflex-vty = self.callHackageDirect {
pkg = "reflex-vty";
ver = "0.1.4.0";
sha256 = "0djs7y4mmkb2q5hvp1fr1gn81k08hzab8v3c6qvh7nyn1fdh8zvh";
} {};
})
];
}).ghc.callPackage ./default.nix {}
Loading

0 comments on commit e79407e

Please sign in to comment.