Skip to content

Commit 1b0222d

Browse files
committed
Build binaries with agpl flag
Unforutnately, this also invovles vendoring Brittany with a fork that allows it to build on ghc-8.10.1. This is only vendored on the cabal.project file though, not the stack.yamls
1 parent 4cdafec commit 1b0222d

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ jobs:
5353
echo '::set-env name=LINUX_CABAL_ARGS::--enable-executable-static --ghc-options=-split-sections'
5454
5555
- name: Build Server
56-
# Try building it twice in case of flakey builds on Windows
5756
run: |
58-
cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \
59-
cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1
57+
cabal build exe:hls -O2 -fagpl $LINUX_CABAL_ARGS
6058
6159
- name: Compress Server Binary
6260
id: compress_server_binary
@@ -95,7 +93,7 @@ jobs:
9593

9694
- name: Build Wrapper
9795
if: matrix.ghc == '8.10.1'
98-
run: cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
96+
run: cabal build exe:hls-wrapper -O2 -fagpl $LINUX_CABAL_ARGS
9997

10098
- name: Compress Wrapper Binary
10199
if: matrix.ghc == '8.10.1'

cabal.project

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ packages:
22
./
33
ghcide
44

5+
source-repository-package
6+
type: git
7+
location: https://github.com/infinity0/brittany.git
8+
tag: 0807fc9b30eb9758dffdb87d2a9a9fa6a17a62b1
9+
10+
allow-newer: data-tree-print:base
11+
512
tests: true
613

714
package *

exe/Main.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
108108
, StylishHaskell.descriptor "stylish-haskell"
109109
, Retrie.descriptor "retrie"
110110
#if AGPL
111-
#if !MIN_VERSION_ghc(8,10,1)
112111
, Brittany.descriptor "brittany"
113-
#endif
114112
#endif
115113
, Eval.descriptor "eval"
116114
]

haskell-language-server.cabal

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ library
101101
else
102102
build-depends: unix
103103
if flag(agpl)
104-
if impl(ghc < 8.10)
105-
build-depends:
106-
brittany
107-
exposed-modules:
108-
Ide.Plugin.Brittany
104+
build-depends:
105+
brittany
106+
exposed-modules:
107+
Ide.Plugin.Brittany
109108

110109
ghc-options:
111110
-Wall

0 commit comments

Comments
 (0)