Repository navigation
host: HostBoard answers attachDynamicPrefs, which MeshCore 1.18 calls - #28
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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":
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())inMyMesh::begin(), and adds a no-opattachDynamicPrefs(KeyValueStore*)toNRF52Board,ESP32BoardandSTM32Board.HostBoardhad no such method, soMyMesh.cppfailed to compile:build.shtreats 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.hgains the same no-opattachDynamicPrefs(KeyValueStore*)that upstream's boards have.KeyValueStoreis forward-declared rather than included, becausehelpers/KeyValueStore.hfirst appears in 1.18.0 and this header still has to build older versions.Checked by compiling (
-fsyntax-only)MyMesh.cppfor 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.