nandi/frqpublic Fork 0
1403956
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

CI that can actually build the Nim core

Both jobs would have failed on this push, and the Alpine image was the reason
rather than a detail. `libfrqcore.so` is NEEDED against libssl.so.3,
libcrypto.so.3 and glibc — so a musl build could not have loaded in `dart:*`
at all, and the job that tried would have reported a missing library rather
than the reason for it.

So the shape changed as well as the image. The library is built once, in the
image that has Nim, and passed to the Dart job as an artifact — rather than
the Dart job installing a second toolchain from apt to rebuild it, which is
also where the Nim version was a guess. Debian on both sides, one OpenSSL 3,
and `needs:` between them.

`libssl-dev` in the Nim job because `nim/nim.cfg` sets `-d:ssl`: std/net links
-lssl and -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over
the same. Without it the compile dies on a missing -lcrypto, which reads as
nothing to do with TLS. `libssl3` in the Dart job because the SDK carries its
own BoringSSL and does not bring OpenSSL with it, and the test dlopens
something that wants one.

The NEEDED line is printed on the way past, non-fatally: a missing libssl in
the Dart job is then obvious from the build log rather than from a StateError
in a different job.

Not run in the containers — there is no docker daemon on this machine, so what
I verified is the part that is mine. The image tags exist, and both job scripts
were run verbatim outside CI: the Nim one produces the artifact and 203 passing
tests, and the Dart one finds that artifact from `dart/frq_core` and passes its
20. What remains unproven is the images themselves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-18T22:49:46-07:00 Browse files
1403956 parent: e50cbc7
modified .gitlab-ci.yml +35 -8
@@ -7,6 +7,15 @@
77 # follow, so there is nothing for a schedule to do.
88 stages: [check]
99
10+# Two toolchains and one artifact between them.
11+#
12+# The library is built once, in the image that has Nim, and the Dart job takes
13+# it rather than installing a second toolchain to rebuild it. That is not only
14+# tidier: `libfrqcore.so` links OpenSSL and is glibc, so it has to be built
15+# somewhere its runtime can load it — which is why the Nim job is the Debian
16+# image and not the Alpine one it used to be. A musl build would not load in
17+# `dart:*` at all.
18+
1019 # common/ is compiled by ClojureDart for two targets — the APK and the Linux
1120 # desktop — and shared code reaching for the JVM or a `dart:` library breaks
1221 # one of them at a namespace nobody touched. `Math/ceil` in the compose bar was
@@ -22,20 +31,38 @@ check-common:
2231 # The Nim core's tests. A second job rather than a step in the first, because
2332 # it wants a compiler where check-common wants nothing: one can fail without
2433 # hiding the other, and the pair of them is still seconds.
34+# The Nim core: its own suite, and the library the Dart job needs.
35+#
36+# `libssl-dev` because `nim/nim.cfg` sets `-d:ssl` — std/net links -lssl and
37+# -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over the
38+# same. Without it the compile fails on a missing -lcrypto, which reads as
39+# nothing to do with TLS.
2540 nim-test:
2641 stage: check
27- image: nimlang/nim:2.2.0-alpine
42+ image: nimlang/nim:2.2.10
43+ before_script:
44+ - apt-get update -qq && apt-get install -y -qq libssl-dev
2845 script:
2946 - cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
47+ - nim c --app:lib --mm:orc -d:release --hints:off --path:src
48+ --out:../build/nim/libfrqcore.so src/frq_core.nim
49+ # Diagnostic, not a gate: prints what the .so will want at runtime, so a
50+ # missing libssl in the Dart job is obvious from this log rather than from
51+ # a StateError in that one.
52+ - objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
53+ artifacts:
54+ paths: [build/nim/libfrqcore.so]
55+ expire_in: 1 hour
3056
31-# The Dart side of the same boundary. Needs the Nim library built first, which
32-# is why this is one job and not two: the artifact would be larger than the
33-# build that makes it.
57+# The Dart side of the same boundary, on the plain VM — no Flutter, no
58+# emulator. It dlopens the library the job above built, so `libssl3` has to be
59+# there: the Dart SDK carries its own BoringSSL and does not bring OpenSSL
60+# with it.
3461 dart-test:
3562 stage: check
3663 image: dart:3.13
64+ needs: [nim-test]
65+ before_script:
66+ - apt-get update -qq && apt-get install -y -qq libssl3
3767 script:
38- - apt-get update -qq && apt-get install -y -qq nim
39- - cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src
40- --out:../build/nim/libfrqcore.so src/frq_core.nim
41- - cd ../dart/frq_core && dart pub get && dart test -r expanded
68+ - cd dart/frq_core && dart pub get && dart test -r expanded
@@ -7,6 +7,15 @@
7 # follow, so there is nothing for a schedule to do.7 # follow, so there is nothing for a schedule to do.
8 stages: [check]8 stages: [check]
9 9
10+# Two toolchains and one artifact between them.
11+#
12+# The library is built once, in the image that has Nim, and the Dart job takes
13+# it rather than installing a second toolchain to rebuild it. That is not only
14+# tidier: `libfrqcore.so` links OpenSSL and is glibc, so it has to be built
15+# somewhere its runtime can load it — which is why the Nim job is the Debian
16+# image and not the Alpine one it used to be. A musl build would not load in
17+# `dart:*` at all.
18+
10 # common/ is compiled by ClojureDart for two targets — the APK and the Linux19 # common/ is compiled by ClojureDart for two targets — the APK and the Linux
11 # desktop — and shared code reaching for the JVM or a `dart:` library breaks20 # desktop — and shared code reaching for the JVM or a `dart:` library breaks
12 # one of them at a namespace nobody touched. `Math/ceil` in the compose bar was21 # one of them at a namespace nobody touched. `Math/ceil` in the compose bar was
@@ -22,20 +31,38 @@ check-common:
22 # The Nim core's tests. A second job rather than a step in the first, because31 # The Nim core's tests. A second job rather than a step in the first, because
23 # it wants a compiler where check-common wants nothing: one can fail without32 # it wants a compiler where check-common wants nothing: one can fail without
24 # hiding the other, and the pair of them is still seconds.33 # hiding the other, and the pair of them is still seconds.
34+# The Nim core: its own suite, and the library the Dart job needs.
35+#
36+# `libssl-dev` because `nim/nim.cfg` sets `-d:ssl` — std/net links -lssl and
37+# -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over the
38+# same. Without it the compile fails on a missing -lcrypto, which reads as
39+# nothing to do with TLS.
25 nim-test:40 nim-test:
26 stage: check41 stage: check
27- image: nimlang/nim:2.2.0-alpine42+ image: nimlang/nim:2.2.10
43+ before_script:
44+ - apt-get update -qq && apt-get install -y -qq libssl-dev
28 script:45 script:
29 - cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done46 - cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
47+ - nim c --app:lib --mm:orc -d:release --hints:off --path:src
48+ --out:../build/nim/libfrqcore.so src/frq_core.nim
49+ # Diagnostic, not a gate: prints what the .so will want at runtime, so a
50+ # missing libssl in the Dart job is obvious from this log rather than from
51+ # a StateError in that one.
52+ - objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
53+ artifacts:
54+ paths: [build/nim/libfrqcore.so]
55+ expire_in: 1 hour
30 56
31-# The Dart side of the same boundary. Needs the Nim library built first, which57+# The Dart side of the same boundary, on the plain VM — no Flutter, no
32-# is why this is one job and not two: the artifact would be larger than the58+# emulator. It dlopens the library the job above built, so `libssl3` has to be
33-# build that makes it.59+# there: the Dart SDK carries its own BoringSSL and does not bring OpenSSL
60+# with it.
34 dart-test:61 dart-test:
35 stage: check62 stage: check
36 image: dart:3.1363 image: dart:3.13
64+ needs: [nim-test]
65+ before_script:
66+ - apt-get update -qq && apt-get install -y -qq libssl3
37 script:67 script:
38- - apt-get update -qq && apt-get install -y -qq nim68+ - cd dart/frq_core && dart pub get && dart test -r expanded
39- - cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src
40- --out:../build/nim/libfrqcore.so src/frq_core.nim
41- - cd ../dart/frq_core && dart pub get && dart test -r expanded
modified .rickub/workflows/build.yml +37 -12
@@ -30,28 +30,53 @@ jobs:
3030 - uses: actions/checkout@v4
3131 - run: python3 tools/check-common.py common
3232
33- # The Nim core's tests. No Flutter, no Dart, no Android SDK — which is the
34- # reason the logic is moving there: a rule about the IRC wire format gets
35- # checked in seconds rather than behind a toolchain.
33+ # The Nim core: its own suite, and the library the Dart job needs.
34+ #
35+ # Debian and not the Alpine image this used to name. `libfrqcore.so` links
36+ # OpenSSL and is glibc, so it has to be built somewhere its runtime can load
37+ # it — a musl build would not load in `dart:*` at all.
38+ #
39+ # `libssl-dev` because `nim/nim.cfg` sets `-d:ssl`: std/net links -lssl and
40+ # -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over the
41+ # same. Without it the compile fails on a missing -lcrypto, which reads as
42+ # nothing to do with TLS.
3643 nim-test:
3744 runs-on: ubuntu-latest
38- container: nimlang/nim:2.2.0-alpine
45+ container: nimlang/nim:2.2.10
3946 steps:
4047 - uses: actions/checkout@v4
41- - run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
48+ - run: apt-get update -qq && apt-get install -y -qq libssl-dev
49+ - name: The Nim suite
50+ run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
51+ - name: Build libfrqcore.so
52+ run: |
53+ cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \
54+ --out:../build/nim/libfrqcore.so src/frq_core.nim
55+ # Diagnostic, not a gate: prints what the .so will want at
56+ # runtime, so a missing libssl in the Dart job is obvious
57+ # from this log rather than from a StateError in that one.
58+ objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
59+ - uses: actions/upload-artifact@v4
60+ with:
61+ name: libfrqcore
62+ path: build/nim/libfrqcore.so
63+ if-no-files-found: error
4264
43- # The Dart side of the Nim boundary, on the plain VM. Builds the library
44- # first — the test dlopens a real .so, and there is no point reporting that
45- # it could not find one.
65+ # The Dart side of the same boundary, on the plain VM — no Flutter, no
66+ # emulator, which is what makes it a second to run. It dlopens the library
67+ # the job above built, so `libssl3` has to be there: the Dart SDK carries
68+ # its own BoringSSL and does not bring OpenSSL with it.
4669 dart-test:
4770 runs-on: ubuntu-latest
4871 container: dart:3.13
72+ needs: [nim-test]
4973 steps:
5074 - uses: actions/checkout@v4
51- - run: apt-get update -qq && apt-get install -y -qq nim
52- - run: |
53- cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \
54- --out:../build/nim/libfrqcore.so src/frq_core.nim
75+ - run: apt-get update -qq && apt-get install -y -qq libssl3
76+ - uses: actions/download-artifact@v4
77+ with:
78+ name: libfrqcore
79+ path: build/nim
5580 - run: cd dart/frq_core && dart pub get && dart test -r expanded
5681
5782 web:
@@ -30,28 +30,53 @@ jobs:
30 - uses: actions/checkout@v430 - uses: actions/checkout@v4
31 - run: python3 tools/check-common.py common31 - run: python3 tools/check-common.py common
32 32
33- # The Nim core's tests. No Flutter, no Dart, no Android SDK — which is the33+ # The Nim core: its own suite, and the library the Dart job needs.
34- # reason the logic is moving there: a rule about the IRC wire format gets34+ #
35- # checked in seconds rather than behind a toolchain.35+ # Debian and not the Alpine image this used to name. `libfrqcore.so` links
36+ # OpenSSL and is glibc, so it has to be built somewhere its runtime can load
37+ # it — a musl build would not load in `dart:*` at all.
38+ #
39+ # `libssl-dev` because `nim/nim.cfg` sets `-d:ssl`: std/net links -lssl and
40+ # -lcrypto for the TLS on :6697, and `frq.atproto` uses httpclient over the
41+ # same. Without it the compile fails on a missing -lcrypto, which reads as
42+ # nothing to do with TLS.
36 nim-test:43 nim-test:
37 runs-on: ubuntu-latest44 runs-on: ubuntu-latest
38- container: nimlang/nim:2.2.0-alpine45+ container: nimlang/nim:2.2.10
39 steps:46 steps:
40 - uses: actions/checkout@v447 - uses: actions/checkout@v4
41- - run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done48+ - run: apt-get update -qq && apt-get install -y -qq libssl-dev
49+ - name: The Nim suite
50+ run: cd nim && for t in tests/t*.nim; do nim c -r --hints:off --path:src "$t"; done
51+ - name: Build libfrqcore.so
52+ run: |
53+ cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \
54+ --out:../build/nim/libfrqcore.so src/frq_core.nim
55+ # Diagnostic, not a gate: prints what the .so will want at
56+ # runtime, so a missing libssl in the Dart job is obvious
57+ # from this log rather than from a StateError in that one.
58+ objdump -p ../build/nim/libfrqcore.so | grep NEEDED || true
59+ - uses: actions/upload-artifact@v4
60+ with:
61+ name: libfrqcore
62+ path: build/nim/libfrqcore.so
63+ if-no-files-found: error
42 64
43- # The Dart side of the Nim boundary, on the plain VM. Builds the library65+ # The Dart side of the same boundary, on the plain VM — no Flutter, no
44- # first — the test dlopens a real .so, and there is no point reporting that66+ # emulator, which is what makes it a second to run. It dlopens the library
45- # it could not find one.67+ # the job above built, so `libssl3` has to be there: the Dart SDK carries
68+ # its own BoringSSL and does not bring OpenSSL with it.
46 dart-test:69 dart-test:
47 runs-on: ubuntu-latest70 runs-on: ubuntu-latest
48 container: dart:3.1371 container: dart:3.13
72+ needs: [nim-test]
49 steps:73 steps:
50 - uses: actions/checkout@v474 - uses: actions/checkout@v4
51- - run: apt-get update -qq && apt-get install -y -qq nim75+ - run: apt-get update -qq && apt-get install -y -qq libssl3
52- - run: |76+ - uses: actions/download-artifact@v4
53- cd nim && nim c --app:lib --mm:orc -d:release --hints:off --path:src \77+ with:
54- --out:../build/nim/libfrqcore.so src/frq_core.nim78+ name: libfrqcore
79+ path: build/nim
55 - run: cd dart/frq_core && dart pub get && dart test -r expanded80 - run: cd dart/frq_core && dart pub get && dart test -r expanded
56 81
57 web:82 web:
added .vscode/settings.json +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1+{
2+ "cmake.sourceDirectory": "/home/nandi/code/frq/.claude/worktrees/flutter-messages-padding-e415bc/flutter/linux"
3+}
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,3 @@
1+{
2+ "cmake.sourceDirectory": "/home/nandi/code/frq/.claude/worktrees/flutter-messages-padding-e415bc/flutter/linux"
3+}
\ No newline at end of file\ No newline at end of file