Skip to content

Commit 7588f8d

Browse files
authored
Merge pull request #1056 from noughtmare/travis-testing
Allow yi to build with ghc-8.2 (without pango)
2 parents 153d062 + 3e1b0be commit 7588f8d

File tree

14 files changed

+82
-127
lines changed

14 files changed

+82
-127
lines changed

.travis.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ cache:
1111

1212
matrix:
1313
include:
14-
- env: RESOLVER="lts-8"
1514
- env: RESOLVER="lts-9"
15+
addons:
16+
apt:
17+
packages:
18+
- libpango1.0-dev
19+
- libgtk2.0-dev
1620
- env: RESOLVER="nightly"
1721
allow_failures:
1822
- env: RESOLVER="nightly"
@@ -25,8 +29,16 @@ before_install:
2529

2630
install:
2731
# install dependencies of yi-core separately to safe memory
28-
- stack --no-terminal --install-ghc --resolver $RESOLVER test yi-core --only-dependencies
29-
- stack --no-terminal --install-ghc --resolver $RESOLVER test --only-dependencies
32+
- stack test yi-core --no-terminal
33+
--install-ghc
34+
--stack-yaml travis/$RESOLVER.yaml
35+
--resolver $RESOLVER
36+
--only-dependencies
37+
- stack test --no-terminal
38+
--install-ghc
39+
--stack-yaml travis/$RESOLVER.yaml
40+
--resolver $RESOLVER
41+
--only-dependencies
3042

3143
script:
32-
- stack --no-terminal --resolver $RESOLVER test
44+
- stack --no-terminal --stack-yaml travis/$RESOLVER.yaml --resolver $RESOLVER test

all-configs.yaml

-38
This file was deleted.

example-configs/yi-emacs-vty-dynamic/yi-emacs-vty-dynamic.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cabal-version: >=1.10
88

99
executable yi
1010
main-is: Main.hs
11-
build-depends: base >=4.8 && <4.10
11+
build-depends: base >=4.8 && <5
1212
, yi-core >= 0.17
1313
, yi-dynamic-configuration >= 0.17
1414
, yi-keymap-emacs >= 0.17

example-configs/yi-vim-colemak-vty-dynamic/yi-vim-colemak-vty-dynamic.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cabal-version: >=1.10
88

99
executable yi
1010
main-is: Main.hs
11-
build-depends: base >=4.8 && <4.10
11+
build-depends: base >=4.8 && <5
1212
, yi-core >= 0.17
1313
, yi-dynamic-configuration >= 0.17
1414
, yi-keymap-vim >= 0.17

example-configs/yi-vim-pango-dynamic/yi-vim-pango-dynamic.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cabal-version: >=1.10
88

99
executable yi
1010
main-is: Main.hs
11-
build-depends: base >=4.8 && <4.10
11+
build-depends: base >=4.8 && <5
1212
, yi-core >= 0.17
1313
, yi-dynamic-configuration >= 0.17
1414
, yi-keymap-vim >= 0.17

example-configs/yi-vim-vty-dynamic/yi-vim-vty-dynamic.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cabal-version: >=1.10
88

99
executable yi
1010
main-is: yi.hs
11-
build-depends: base >=4.8 && <4.10
11+
build-depends: base >=4.8 && <5
1212
, yi-core >= 0.17
1313
, yi-dynamic-configuration >= 0.17
1414
, yi-keymap-vim >= 0.17

lts-6.yaml

-23
This file was deleted.

lts-7.yaml

-22
This file was deleted.

maintainer/upload.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ main = do
1515
callProcess "stack" ["sdist", p]
1616

1717
forM_ packages $ \p ->
18-
when (p `notElem` ["yi", "yi-intero"]) $ catch
18+
when (p `notElem` ["yi-intero"]) $ catch
1919
(callProcess "stack" ["upload", "--no-signature", p])
20-
(\e -> let _ = e :: SomeException in pure ())
20+
(\e -> let _ = e :: SomeException in pure ())

stack-ghc-8.2.yaml

-28
This file was deleted.

stack.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ packages:
55
- yi-core
66
- yi-dynamic-configuration
77
- yi-frontend-vty
8-
# - yi-frontend-pango
8+
- yi-frontend-pango
99
- yi-fuzzy-open
1010
- yi-keymap-cua
1111
- yi-keymap-emacs
@@ -17,15 +17,15 @@ packages:
1717
- yi-ireader
1818
- yi-language
1919
- yi-snippet
20-
# - yi
20+
- yi
2121
extra-deps:
2222
- yi-rope-0.10
23-
resolver: lts-8.18
23+
resolver: lts-9.8
2424
build:
2525
library-profiling: false
2626
executable-profiling: false
2727

2828
# needed for macOS
2929
# flags:
3030
# gtk:
31-
# have-quartz-gtk: true
31+
# have-quartz-gtk: true

travis/lts-9.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
packages:
2+
- ../yi-core
3+
- ../yi-dynamic-configuration
4+
- ../yi-frontend-vty
5+
- ../yi-frontend-pango
6+
- ../yi-fuzzy-open
7+
- ../yi-keymap-cua
8+
- ../yi-keymap-emacs
9+
- ../yi-keymap-vim
10+
- ../yi-mode-haskell
11+
- ../yi-mode-javascript
12+
- ../yi-misc-modes
13+
- ../yi-intero
14+
- ../yi-ireader
15+
- ../yi-language
16+
- ../yi-snippet
17+
- ../yi
18+
- ../example-configs/yi-all-static
19+
- ../example-configs/yi-emacs-vty-static
20+
- ../example-configs/yi-emacs-vty-dynamic
21+
- ../example-configs/yi-vim-colemak-vty-dynamic
22+
- ../example-configs/yi-vim-pango-dynamic
23+
- ../example-configs/yi-vim-pango-static
24+
- ../example-configs/yi-vim-vty-dynamic
25+
- ../example-configs/yi-vim-vty-static
26+
extra-deps:
27+
- yi-rope-0.10
28+
resolver: lts-9.8

travis/nightly.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
resolver: nightly-2017-10-11
2+
3+
packages:
4+
- ../yi-core
5+
- ../yi-dynamic-configuration
6+
- ../yi-frontend-vty
7+
# - ../yi-frontend-pango
8+
- ../yi-fuzzy-open
9+
- ../yi-keymap-cua
10+
- ../yi-keymap-emacs
11+
- ../yi-keymap-vim
12+
- ../yi-mode-haskell
13+
- ../yi-mode-javascript
14+
- ../yi-misc-modes
15+
- ../yi-ireader
16+
- ../yi-language
17+
- ../yi-snippet
18+
- ../yi
19+
# - ../example-configs/yi-all-static
20+
- ../example-configs/yi-emacs-vty-static
21+
- ../example-configs/yi-emacs-vty-dynamic
22+
- ../example-configs/yi-vim-colemak-vty-dynamic
23+
# - ../example-configs/yi-vim-pango-dynamic
24+
# - ../example-configs/yi-vim-pango-static
25+
- ../example-configs/yi-vim-vty-dynamic
26+
- ../example-configs/yi-vim-vty-static

yi/yi.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ flag emacs
1919
default: True
2020

2121
flag pango
22-
description: Include the pango (GUI) frontend
22+
description: Include the pango (GUI) frontend, this flag is ignored if compiling with ghc >= 8.2
2323
manual: True
2424
default: True
2525

@@ -52,7 +52,7 @@ executable yi
5252
cpp-options: -DVTY
5353
build-depends:
5454
yi-frontend-vty >= 0.17
55-
if flag(pango)
55+
if flag(pango) && impl(ghc < 8.2)
5656
cpp-options: -DPANGO
5757
build-depends:
5858
yi-frontend-pango >= 0.17

0 commit comments

Comments
 (0)