Skip to content

host: HostBoard answers attachDynamicPrefs, which MeshCore 1.18 calls - #28

Merged
A13xB0 merged 1 commit into
mainfrom
host-board-attach-dynamic-prefs
Oct 15, 2026
Merged

A13xB0 merged 1 commit into
mainfrom
host-board-attach-dynamic-prefs

Conversation

@A13xB0

@A13xB0 A13xB0 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

What failed

Build run 38820929569 for the 1.18.0 tags (repeater, room-server, companion) failed in every job on all three platforms, at "Build every role MeshCore ships":

build.sh: simple_room_server does not link for a host on this MeshCore version.
Unresolved after dropping 5 board-specific sources:
undefined reference to `MyMesh::MyMesh(...)'
undefined reference to `MyMesh::begin(Adafruit_LittleFS*)'
...
built=0 failed=1

The publish jobs then found no binaries and left the 1.18.0 releases alone.

Why

MeshCore 1.18.0 (upstream 47b0b7b3) has every role call board.attachDynamicPrefs(_prefs.getCustom()) in MyMesh::begin(), and adds a no-op attachDynamicPrefs(KeyValueStore*) to NRF52Board, ESP32Board and STM32Board. HostBoard had no such method, so MyMesh.cpp failed to compile:

MyMesh.cpp:729:9: error: 'class HostBoard' has no member named 'attachDynamicPrefs'

build.sh treats a source that will not compile as board-specific and drops it, so the real error never reached the log. What showed instead was a link failure on MyMesh's own methods.

The change

variants/host/HostBoard.h gains the same no-op attachDynamicPrefs(KeyValueStore*) that upstream's boards have. KeyValueStore is forward-declared rather than included, because helpers/KeyValueStore.h first appears in 1.18.0 and this header still has to build older versions.

Checked by compiling (-fsyntax-only) MyMesh.cpp for simple_repeater, simple_room_server and companion_radio against repeater-v1.18.0 with build.sh's flags: the error is gone and nothing else fails. This PR's CI builds simple_repeater against upstream's default branch. The full cross-platform build runs on the next tag or dispatch of build.yml after merge.

MeshCore 1.18.0 has every role call board.attachDynamicPrefs() in begin(),
and gives its own nRF52, ESP32 and STM32 boards a no-op for it. HostBoard
had none, so MyMesh.cpp stopped compiling, build.sh dropped it as a
board-specific source, and every role failed to link on every platform
with MyMesh's own methods undefined.

KeyValueStore is forward-declared rather than included because the
header only exists from 1.18 on.
@A13xB0
A13xB0 merged commit f268766 into main Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants