Skip to content

Commit

Permalink
Build binaries with agpl flag
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lukel97 committed Aug 5, 2020
1 parent 4cdafec commit 1b0222d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ jobs:
echo '::set-env name=LINUX_CABAL_ARGS::--enable-executable-static --ghc-options=-split-sections'
- name: Build Server
# Try building it twice in case of flakey builds on Windows
run: |
cabal build exe:hls -O2 $LINUX_CABAL_ARGS || \
cabal build exe:hls -O2 $LINUX_CABAL_ARGS -j1
cabal build exe:hls -O2 -fagpl $LINUX_CABAL_ARGS
- name: Compress Server Binary
id: compress_server_binary
Expand Down Expand Up @@ -95,7 +93,7 @@ jobs:

- name: Build Wrapper
if: matrix.ghc == '8.10.1'
run: cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
run: cabal build exe:hls-wrapper -O2 -fagpl $LINUX_CABAL_ARGS

- name: Compress Wrapper Binary
if: matrix.ghc == '8.10.1'
Expand Down
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ packages:
./
ghcide

source-repository-package
type: git
location: https://github.com/infinity0/brittany.git
tag: 0807fc9b30eb9758dffdb87d2a9a9fa6a17a62b1

allow-newer: data-tree-print:base

tests: true

package *
Expand Down
2 changes: 0 additions & 2 deletions exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ idePlugins includeExamples = pluginDescToIdePlugins allPlugins
, StylishHaskell.descriptor "stylish-haskell"
, Retrie.descriptor "retrie"
#if AGPL
#if !MIN_VERSION_ghc(8,10,1)
, Brittany.descriptor "brittany"
#endif
#endif
, Eval.descriptor "eval"
]
Expand Down
9 changes: 4 additions & 5 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ library
else
build-depends: unix
if flag(agpl)
if impl(ghc < 8.10)
build-depends:
brittany
exposed-modules:
Ide.Plugin.Brittany
build-depends:
brittany
exposed-modules:
Ide.Plugin.Brittany

ghc-options:
-Wall
Expand Down

0 comments on commit 1b0222d

Please sign in to comment.