Skip to content

Commit 53c3676

Browse files
committed
Tidy up and switch back to cabal helper implicit cradle
1 parent bcfa908 commit 53c3676

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
shell: bash
4949
run: |
5050
echo '::set-env name=EXE_EXT::.exe'
51-
echo '::set-env name=WIN_CABAL_ARGS::-j1'
5251
5352
- name: Set some linux specific things
5453
if: matrix.os == 'ubuntu-latest'
@@ -59,8 +58,8 @@ jobs:
5958
shell: bash
6059
# Try building it twice in case of flakey builds on Windows
6160
run: |
62-
cabal build exe:hls -O2 --disable-documentation $WIN_CABAL_ARGS $LINUX_CABAL_ARGS || \
63-
cabal build exe:hls -O2 --disable-documentation $WIN_CABAL_ARGS $LINUX_CABAL_ARGS
61+
cabal build exe:hls -O2 --disable-documentation $LINUX_CABAL_ARGS || \
62+
cabal build exe:hls -O2 --disable-documentation $LINUX_CABAL_ARGS
6463
6564
- name: Find Server Binary
6665
id: find_server_binary

docs/releases.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ will most almost certainly not exist on the end user's machine.
4545
Therefore, hie-bios provides `getGhcRuntimeLibDir` to obtain this path on the fly
4646
by consulting the cradle.
4747

48+
### Static binaries
49+
We use the word "distributable" here because technically only the Linux builds
50+
are static. They are built by passing `--enable-executable-static` to cabal.
51+
Static binaries don't really exist on macOS, and there are issues with
52+
proprietary code being linked in on Windows. However, the `.dylib`s linked on
53+
macOS are all already provided by the system:
54+
55+
```
56+
$ objdump -macho --dylibs-used haskell-language-server
57+
haskell-language-server:
58+
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
59+
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
60+
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
61+
/usr/lib/libcharset.1.dylib (compatibility version 2.0.0, current version 2.0.0)
62+
```
63+
4864
## The GitHub Actions workflow
4965
It just kicks off a matrix of jobs varying across GHC versions and OSs, building
5066
the binaries with Cabal and extracting them from the dist-newstyle directory.

exe/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
22
-- SPDX-License-Identifier: Apache-2.0
3-
{-# LANGUAGE CPP #-} -- To get precise GHC version and check if distributed binary
3+
{-# LANGUAGE CPP #-} -- To get precise GHC version
44
{-# LANGUAGE TemplateHaskell #-}
55
{-# OPTIONS_GHC -Wno-dodgy-imports #-} -- GHC no longer exports def in GHC 8.6 and above
66
{-# LANGUAGE DeriveGeneric #-}
@@ -72,7 +72,6 @@ import Ide.Plugin.StylishHaskell as StylishHaskell
7272
import Ide.Plugin.Brittany as Brittany
7373
#endif
7474
import Ide.Plugin.Pragmas as Pragmas
75-
-- import Data.Typeable (Typeable)
7675

7776

7877
-- ---------------------------------------------------------------------

src/Ide/Cradle.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ findLocalCradle fp = do
5454
debugm $ "Found \"" ++ yaml ++ "\" for \"" ++ fp ++ "\""
5555
crdl <- Bios.loadCradle yaml
5656
return $ fmap (const CabalNone) crdl
57-
Nothing -> Bios.loadImplicitCradle fp -- cabalHelperCradle fp
57+
Nothing -> cabalHelperCradle fp
5858
logm $ "Module \"" ++ fp ++ "\" is loaded by Cradle: " ++ show crdl
5959
return crdl
6060

0 commit comments

Comments
 (0)