Skip to content

Commit 07ead2f

Browse files
committed
WIP upgrade all builds for GHC 9.4
1 parent 6e6b1f4 commit 07ead2f

21 files changed

+108
-292
lines changed

.github/workflows/build-linux-arm64.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ on:
22
push:
33
branches:
44
- distribute
5+
- linux
6+
- linux-arm64
57

68
name: Build Linux arm64
79
jobs:

.github/workflows/build-linux-x86_64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
branches:
44
- distribute
55
- linux
6+
- linux-x86_64
67

78
name: Build Linux x86_64
89
jobs:

.github/workflows/build-macos-arm64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
branches:
44
- distribute
55
- macos
6+
- macos-arm64
67

78
name: Build MacOS arm64
89
jobs:
@@ -22,6 +23,5 @@ jobs:
2223
- name: Run distribution script
2324
run: |
2425
test -x "$(which ghcup)" && curl https://downloads.haskell.org/~ghcup/aarch64-apple-darwin-ghcup -o ~/.local/bin/ghcup && chmod a+x ~/.local/bin/ghcup
25-
brew install llvm@12
2626
cd distribution
2727
./build-macos-arm64.sh

.github/workflows/build-macos-x86_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
branches:
44
- distribute
55
- macos
6+
- macos-x86_64
67

78
name: Build MacOS x86_64
89
jobs:
@@ -22,6 +23,5 @@ jobs:
2223
- name: Run distribution script
2324
run: |
2425
test -x "$(which ghcup)" && curl https://downloads.haskell.org/~ghcup/aarch64-apple-darwin-ghcup -o ~/.local/bin/ghcup && chmod a+x ~/.local/bin/ghcup
25-
brew install llvm@12
2626
cd distribution
2727
./build-macos-x86_64.sh

builder/src/BackgroundWriter.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import Data.Foldable (traverse_)
1515
import qualified File
1616

1717

18+
import Lamdera ((&))
19+
import qualified Lamdera
1820

1921
-- BACKGROUND WRITER
2022

@@ -36,7 +38,7 @@ writeBinary :: (Binary.Binary a) => Scope -> FilePath -> a -> IO ()
3638
writeBinary (Scope workList) path value =
3739
do mvar <- newEmptyMVar
3840
_ <- forkIO (File.writeBinary path value >> putMVar mvar ())
41+
& Lamdera.alternativeImplementation (forkIO (Lamdera.writeBinaryValueStrict path value >> putMVar mvar ()))
3942
oldWork <- takeMVar workList
4043
let !newWork = mvar:oldWork
4144
putMVar workList newWork
42-

builder/src/Stuff.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,16 @@ stuff root =
4848
details :: FilePath -> FilePath
4949
details root =
5050
stuff root </> "d.dat"
51-
& Lamdera.alternativeImplementation (stuff root </> "d.x.dat")
5251

5352

5453
interfaces :: FilePath -> FilePath
5554
interfaces root =
5655
stuff root </> "i.dat"
57-
& Lamdera.alternativeImplementation (stuff root </> "i.x.dat")
5856

5957

6058
objects :: FilePath -> FilePath
6159
objects root =
6260
stuff root </> "o.dat"
63-
& Lamdera.alternativeImplementation (stuff root </> "o.x.dat")
6461

6562

6663
prepublishDir :: FilePath -> FilePath

cabal.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
profiling: False
2-
library-profiling: True
2+
library-profiling: True

cabal.project

Lines changed: 0 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -4,204 +4,3 @@ packages:
44
./vendor/elm-format/elm-format-lib
55
./vendor/elm-format/avh4-lib
66
./vendor/elm-format
7-
8-
allow-older: avh4-lib:*, elm-format:*, elm-format-lib:*, elm-format-markdown:*
9-
allow-newer: avh4-lib:*, elm-format:*, elm-format-lib:*, elm-format-markdown:*
10-
11-
-- Produced with `stack ls dependencies` & manually formatted
12-
constraints:
13-
Cabal ==3.4.1.0,
14-
HTTP ==4000.3.16,
15-
HUnit ==1.6.2.0,
16-
OneTuple ==0.3.1,
17-
QuickCheck ==2.14.2,
18-
SHA ==1.6.4.4,
19-
StateVar ==1.2.2,
20-
aeson ==2.0.3.0,
21-
ansi-terminal ==0.11,
22-
ansi-wl-pprint ==0.6.9,
23-
appar ==0.1.8,
24-
array ==0.5.4.0,
25-
asn1-encoding ==0.9.6,
26-
asn1-parse ==0.9.5,
27-
asn1-types ==0.3.4,
28-
assoc ==1.0.2,
29-
async ==2.2.4,
30-
attoparsec ==0.14.4,
31-
auto-update ==0.1.6,
32-
avh4-lib ==0.0.0.1,
33-
base ==4.15.1.0,
34-
base-compat ==0.11.2,
35-
base-compat-batteries ==0.11.2,
36-
base-orphans ==0.8.7,
37-
base64-bytestring ==1.2.1.0,
38-
basement ==0.0.15,
39-
bifunctors ==5.5.13,
40-
bimap ==0.4.0,
41-
binary ==0.8.8.0,
42-
blaze-builder ==0.4.2.2,
43-
broadcast-chan ==0.2.1.2,
44-
bsb-http-chunked ==0.0.0.4,
45-
byteorder ==1.0.4,
46-
bytestring ==0.10.12.1,
47-
bytestring-builder ==0.10.8.2.0,
48-
cabal-doctest ==1.0.9,
49-
call-stack ==0.4.0,
50-
case-insensitive ==1.2.1.0,
51-
cereal ==0.5.8.3,
52-
charset ==0.3.9,
53-
clock ==0.8.3,
54-
colour ==2.3.6,
55-
command ==0.1.1,
56-
comonad ==5.0.8,
57-
conduit ==1.3.4.3,
58-
conduit-extra ==1.3.6,
59-
connection ==0.3.1,
60-
containers ==0.6.4.1,
61-
contravariant ==1.5.5,
62-
cookie ==0.4.5,
63-
cryptohash-md5 ==0.11.101.0,
64-
cryptohash-sha1 ==0.11.101.0,
65-
cryptonite ==0.29,
66-
data-default-class ==0.1.2.0,
67-
data-fix ==0.3.2,
68-
deepseq ==1.4.5.0,
69-
digest ==0.0.1.3,
70-
directory ==1.3.6.2,
71-
distributive ==0.6.2.1,
72-
dlist ==1.0,
73-
double-conversion ==2.0.4.1,
74-
easy-file ==0.2.2,
75-
edit-distance ==0.2.2.1,
76-
elm ==0.19.1,
77-
elm-format ==0.8.5,
78-
elm-format-lib ==0.0.0.1,
79-
elm-format-markdown ==0.0.0.1,
80-
entropy ==0.4.1.10,
81-
exceptions ==0.10.4,
82-
fast-logger ==3.1.1,
83-
file-embed ==0.0.15.0,
84-
filelock ==0.1.1.5,
85-
filemanip ==0.3.6.3,
86-
filepath ==1.4.2.1,
87-
fold-debounce ==0.2.0.9,
88-
formatting ==7.1.3,
89-
fsnotify ==0.3.0.1,
90-
ghc-bignum ==1.1,
91-
ghc-boot-th ==9.0.2,
92-
ghc-prim ==0.7.0,
93-
githash ==0.1.6.3,
94-
hashable ==1.3.5.0,
95-
haskeline ==0.8.2,
96-
hfsevents ==0.1.6,
97-
hourglass ==0.2.12,
98-
http-client ==0.7.13.1,
99-
http-client-tls ==0.3.6.1,
100-
http-date ==0.0.11,
101-
http-types ==0.12.3,
102-
http2 ==3.0.3,
103-
indexed-traversable ==0.1.2,
104-
indexed-traversable-instances ==0.1.1.1,
105-
integer-gmp ==1.1,
106-
integer-logarithms ==1.0.3.1,
107-
io-streams ==1.5.2.2,
108-
io-streams-haproxy ==1.0.1.0,
109-
iproute ==1.7.12,
110-
language-glsl ==0.3.0,
111-
lifted-base ==0.2.3.12,
112-
listsafe ==0.1.0.1,
113-
main-tester ==0.2.0.1,
114-
megaparsec ==9.2.2,
115-
memory ==0.16.0,
116-
mime-types ==0.1.1.0,
117-
monad-control ==1.0.3.1,
118-
mono-traversable ==1.0.15.3,
119-
mtl ==2.2.2,
120-
natural-sort ==0.1.2,
121-
neat-interpolation ==0.5.1.3,
122-
network ==3.1.2.7,
123-
network-byte-order ==0.1.6,
124-
network-info ==0.2.1,
125-
network-uri ==2.6.4.1,
126-
old-locale ==1.0.0.7,
127-
old-time ==1.1.0.3,
128-
optparse-applicative ==0.16.1.0,
129-
parsec ==3.1.14.0,
130-
parser-combinators ==1.3.0,
131-
parsers ==0.12.11,
132-
pem ==0.2.4,
133-
pretty ==1.1.3.6,
134-
prettyclass ==1.0.0.0,
135-
primitive ==0.7.3.0,
136-
process ==1.6.13.2,
137-
psqueues ==0.2.7.3,
138-
random ==1.2.1.1,
139-
raw-strings-qq ==1.1,
140-
readable ==0.3.1,
141-
regex-base ==0.94.0.2,
142-
regex-posix ==0.96.0.1,
143-
regex-posix-clib ==2.7,
144-
relude ==1.0.0.1,
145-
resourcet ==1.2.6,
146-
rts ==1.0.2,
147-
safe ==0.3.19,
148-
safe-exceptions ==0.1.7.3,
149-
scientific ==0.3.7.0,
150-
semialign ==1.2.0.1,
151-
semigroupoids ==5.3.7,
152-
simple-sendfile ==0.2.30,
153-
snap-core ==1.0.5.0,
154-
snap-server ==1.1.2.0,
155-
socks ==0.6.1,
156-
split ==0.2.3.5,
157-
splitmix ==0.1.0.4,
158-
stm ==2.5.0.0,
159-
stm-delay ==0.1.1.1,
160-
streaming-commons ==0.2.2.5,
161-
strict ==0.4.0.1,
162-
stringsearch ==0.3.6.6,
163-
tagged ==0.8.6.1,
164-
template-haskell ==2.17.0.0,
165-
terminfo ==0.4.1.5,
166-
text ==1.2.5.0,
167-
text-short ==0.1.5,
168-
th-abstraction ==0.4.5.0,
169-
th-compat ==0.1.4,
170-
these ==1.1.1.1,
171-
time ==1.9.3,
172-
time-compat ==1.9.6.1,
173-
time-manager ==0.0.0,
174-
timeout ==0.1.1,
175-
tls ==1.5.8,
176-
transformers ==0.5.6.2,
177-
transformers-base ==0.4.6,
178-
transformers-compat ==0.6.6,
179-
tree-diff ==0.2.2,
180-
typed-process ==0.2.10.1,
181-
unicode-show ==0.1.1.1,
182-
unix ==2.7.2.2,
183-
unix-compat ==0.5.4,
184-
unix-time ==0.4.8,
185-
unliftio ==0.2.23.0,
186-
unliftio-core ==0.2.0.1,
187-
unordered-containers ==0.2.17.0,
188-
utf8-string ==1.0.2,
189-
uuid ==1.3.15,
190-
uuid-types ==1.0.5,
191-
vault ==0.3.1.5,
192-
vector ==0.12.3.1,
193-
vector-algorithms ==0.8.0.4,
194-
wai ==3.2.3,
195-
wai-logger ==2.4.0,
196-
warp ==3.3.21,
197-
websockets ==0.12.7.3,
198-
websockets-snap ==0.10.3.1,
199-
witherable ==0.4.2,
200-
word8 ==0.1.3,
201-
x509 ==1.7.7,
202-
x509-store ==1.6.9,
203-
x509-system ==1.6.7,
204-
x509-validation ==1.6.12,
205-
zip-archive ==0.4.2.2,
206-
zlib ==0.6.3.0,
207-
zlib-bindings ==0.1.1.5,

distribution/build-linux-arm32v7-musl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex # Be verbose and exit immediately on error instead of trying to continue
33

4-
version="1.2.0"
4+
source "common.sh"
55
os="linux"
66
arch="arm32v7"
77

distribution/build-linux-arm64-musl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex # Be verbose and exit immediately on error instead of trying to continue
33

4-
version="1.2.0"
4+
source "common.sh"
55
os="linux"
66
arch="arm64"
77

distribution/build-linux-x86_64-musl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex # Be verbose and exit immediately on error instead of trying to continue
33

4-
version="1.2.0"
4+
source "common.sh"
55
os="linux"
66
arch="x86_64"
77

distribution/build-macos-arm64.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex # Be verbose and exit immediately on error instead of trying to continue
33

4-
version="1.2.0"
4+
source "common.sh"
55
os="macos"
66
arch="arm64"
77

@@ -16,28 +16,20 @@ if ! uname -a | grep "Darwin" && uname -a | grep "arm64"; then
1616
exit 1;
1717
fi
1818

19-
stackVersion=2.9.3
20-
isolate=~/.ghcup/macos-$arch
19+
stackVersion=2.11.1
20+
isolate=~/.ghcup/$os-$arch
2121
mkdir -p $isolate
2222
stack="$isolate/stack"
2323

2424
# Ensure correct arch toolchain is installed, or install it
2525
# Hopefully in future ghcup has better multi-arch support
26-
if [ ! -f $stack ]; then
26+
if [ ! -f "$stack" ]; then
2727
ghcup install stack "$stackVersion" --isolate "$isolate" --force
2828
fi
2929

30-
# /opt/homebrew/opt/llvm/bin/opt --version # The arm64 build currently requires llvm until we get to GHC 9.4+
31-
32-
3330
cd "$scriptDir/.." # Move into the project root
3431
git submodule init && git submodule update
3532

36-
ffiLibs="$(xcrun --show-sdk-path)/usr/include/ffi" # Workaround for GHC9.0.2 bug until we can use GHC9.2.3+
37-
export C_INCLUDE_PATH=$ffiLibs # https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_436353
38-
39-
export PATH="/opt/homebrew/opt/llvm@12/bin:$PATH" # The arm64 build currently requires llvm until we get to GHC 9.4+
40-
4133
$stack install --local-bin-path $dist
4234

4335
cp $dist/lamdera $bin # Copy built binary to dist

0 commit comments

Comments
 (0)