Skip to content

Commit 270a9bf

Browse files
committed
[ change ] Replace WASM git submodules with cabal source-repository-package except for network
1 parent 5e52fe2 commit 270a9bf

File tree

9 files changed

+56
-22
lines changed

9 files changed

+56
-22
lines changed

.github/workflows/wasm.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v4
2222
with:
2323
path: als
24-
submodules: recursive
24+
submodules: true
2525

2626
- name: Compute cache key
2727
run: echo "CI_CACHE_KEY=${{ runner.os }}-${{ runner.arch }}-${{ env.GHC_WASM_META_COMMIT_HASH }}-flavor-${{ env.GHC_WASM_META_FLAVOUR }}" >> "$GITHUB_ENV"
@@ -106,12 +106,14 @@ jobs:
106106
path: als/dist-newstyle
107107
key: dist-newstyle-${{ env.CI_CACHE_KEY }}-${{ hashFiles('als/dist-newstyle/**') }}
108108

109-
- name: Build every dependency else
109+
- name: Build dependencies
110110
working-directory: './als'
111111
run: |
112+
# Setup network submodule autotools
112113
cd wasm-submodules/network
113114
autoreconf -i
114115
cd ../..
116+
# Build all dependencies (cabal git deps + network submodule)
115117
wasm32-wasi-cabal build --dependencies-only
116118
117119
- name: Build als

.gitmodules

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
[submodule "wasm-submodules/agda"]
2-
path = wasm-submodules/agda
3-
url = [email protected]:agda-web/agda.git
4-
[submodule "wasm-submodules/foundation"]
5-
path = wasm-submodules/foundation
6-
url = [email protected]:haskell-wasm/foundation.git
71
[submodule "wasm-submodules/network"]
82
path = wasm-submodules/network
93
url = https://github.com/haskell-wasm/network
10-
[submodule "wasm-submodules/network-simple-0.4.2"]
11-
path = wasm-submodules/network-simple-0.4.2
12-
url = https://github.com/k0001/network-simple
13-
[submodule "wasm-submodules/lsp"]
14-
path = wasm-submodules/lsp
15-
url = [email protected]:agda-web/lsp.git
164

BUILDING_WASM.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
2. `cd` into `wasm-submodules/network` and run `autoreconf -i`.
55
3. In the project root, run `cp cabal.project{.wasm32,}`, and then `wasm32-wasi-cabal build`.
66

7+
Note: This project uses a hybrid approach - most dependencies use cabal's git handling, but the network package remains as a git submodule due to autotools requirements.
8+
79
The process might output the following:
810

911
```

cabal.project

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
packages:
2+
.
3+
wasm-submodules/network
4+
5+
source-repository-package
6+
type: git
7+
location: https://github.com/agda-web/agda.git
8+
tag: 87cac9ce17932321dc1a0fdaed83436de22fa0aa
9+
10+
source-repository-package
11+
type: git
12+
location: https://github.com/haskell-wasm/foundation.git
13+
tag: 8e6dd48527fb429c1922083a5030ef88e3d58dd3
14+
subdir: basement
15+
16+
source-repository-package
17+
type: git
18+
location: https://github.com/k0001/network-simple.git
19+
tag: 2c3ab6e7aa2a86be692c55bf6081161d83d50c34
20+
21+
source-repository-package
22+
type: git
23+
location: https://github.com/agda-web/lsp.git
24+
tag: 9baf76e6d9965a3b6e8b3ecfcdf33c62b5628fd8
25+
subdir: lsp-types
26+
27+
package Agda
28+
flags: +optimise-heavily

cabal.project.wasm32

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
packages:
22
.
3-
wasm-submodules/agda
4-
wasm-submodules/foundation/basement
53
wasm-submodules/network
6-
wasm-submodules/network-simple-0.4.2
7-
wasm-submodules/lsp/lsp-types
4+
5+
source-repository-package
6+
type: git
7+
location: https://github.com/agda-web/agda.git
8+
tag: 87cac9ce17932321dc1a0fdaed83436de22fa0aa
9+
10+
source-repository-package
11+
type: git
12+
location: https://github.com/haskell-wasm/foundation.git
13+
tag: 8e6dd48527fb429c1922083a5030ef88e3d58dd3
14+
subdir: basement
15+
16+
source-repository-package
17+
type: git
18+
location: https://github.com/k0001/network-simple.git
19+
tag: 2c3ab6e7aa2a86be692c55bf6081161d83d50c34
20+
21+
source-repository-package
22+
type: git
23+
location: https://github.com/agda-web/lsp.git
24+
tag: 9baf76e6d9965a3b6e8b3ecfcdf33c62b5628fd8
25+
subdir: lsp-types
826

927
package Agda
1028
flags: +optimise-heavily

wasm-submodules/agda

Lines changed: 0 additions & 1 deletion
This file was deleted.

wasm-submodules/foundation

Lines changed: 0 additions & 1 deletion
This file was deleted.

wasm-submodules/lsp

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)