Skip to content

Commit 08f0a8b

Browse files
Temporal compile config fix for MacOS, due to new 0.2.9 BearSSL cause on chronos 4.2.2
1 parent 43452e2 commit 08f0a8b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

config.nims

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,27 @@ else:
6363
switch("passC", "-mno-avx512f")
6464
switch("passL", "-mno-avx512f")
6565

66+
when defined(macosx):
67+
# TEMPORARY (added 2026-06-19) — remove once nim-chronos is fixed/bumped upstream.
68+
#
69+
# macOS / Apple Clang 16+ promotes -Wincompatible-function-pointer-types to a
70+
# DEFAULT error (not gated behind -Werror). It fires on a dependency↔dependency
71+
# call in nim-chronos — none of our code is involved:
72+
# chronos/streams/tlsstream.nim:718 ctx.setdest(itemAppend, ...)
73+
# chronos declares the PEM callback `itemAppend(ctx, pbytes: pointer, nbytes)`
74+
# while bearssl's `br_pem_decoder_setdest` expects `pbytes: const void*`. The
75+
# callback only READS the buffer (copyMem from pbytes), so the missing `const`
76+
# is benign — we demote the diagnostic back to a warning instead of failing.
77+
#
78+
# Why it appeared now (not a change on our side): the `const` was introduced in
79+
# nim-bearssl v0.2.9, published 2026-06-19 11:22 UTC. CI does not honor the
80+
# locked bearssl (nimble.lock pins 0.2.8) and fresh-resolves to latest, so any
81+
# run after 11:22 UTC picks up 0.2.9 and hits this. Earlier-running PRs that
82+
# resolved 0.2.8 are green only by timing; re-running them now reproduces it.
83+
#
84+
# Proper fix: chronos should declare `itemAppend`'s `pbytes` as `const pointer`.
85+
switch("passC", "-Wno-error=incompatible-function-pointer-types")
86+
6687
--threads:
6788
on
6889
--opt:

0 commit comments

Comments
 (0)