Repository navigation
Build cleanly with clang 23 and current Qt; give the lims desktop client a session - #874
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Clang 23 adds a lifetime-safety analysis that -Weverything enables and -Werror makes fatal. It raises suggestions to annotate declarations (including in Qt's generated moc code), reports that existing MORPH_LIFETIMEBOUND contracts cannot be verified, and false invalidations (push_back on a vector& parameter). None is a defect, and the analysis does not yet follow this code. The three groups are suppressed through _morph_clang_suppression_if_supported, so older clang, CI's included, is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
…et QTP0004 Qt warns at configure time when a QML module's OUTPUT_DIRECTORY does not end in its target path, because qmllint then cannot use the build tree as an import path. Each module (the ladder rungs, MorphForms, the forms demo) now writes to <binary dir>/<Uri>; the install step reads the location from the target property, so it follows. Modules whose .qml files sit in a subdirectory set QTP0004 to NEW, guarded for Qt versions that predate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
…efused Every mutating lims action refuses an empty principal, and the desktop client built its bridges without a session, so RegisterClient and every other write failed with "mutating action dispatched with an empty principal". The presenter tests installed a principal of their own and the GUI smoke test dispatches nothing, so nothing exercised the client as it ships. installDesktopSession() now lives in gui_lib, called by main.cpp in local mode and by a test that registers a client and a sample through a bridge set up the same way; without the session that test fails with the error above. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2
Yaraslaut
force-pushed
the
build/clang23-lifetime-safety
branch
from
October 5, 2026 02:06
17eb74a to
308d1b8
Compare
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.
On a machine with clang 23 and Qt 6.11,
cmake --build --preset linux-everythingfailed. This PR makes that build clean, with no CMake warnings, and fixes a lims GUI defect found while trying the result.Changes
clang 23's lifetime-safety analysis.
-Weverythingturns it on and-Werrormakes it fatal; it fired in about 20 places in morph's headers and in Qt's generated moc code. None of the diagnostics is a defect:MORPH_LIFETIMEBOUNDcontracts can't be verified;push_backon astd::vector¶meter reported as a use ofoutafter invalidating it.Three groups are suppressed, because
-Wno-lifetime-safetyalone leaves the suggestion and lifetimebound groups on:-Wlifetime-safety,-Wlifetime-safety-suggestionsand-Wlifetime-safety-lifetimebound-violation. They go through_morph_clang_suppression_if_supported, so older clang, including CI's clang 22, is unchanged.QML module output directories. Qt warned at configure time that six modules had an
OUTPUT_DIRECTORYthat doesn't end in their target path, which stopsqmllintfrom using the build tree as an import path. The modules are the ladder rungs,MorphFormsand the forms demo. Each now writes to<binary dir>/<Uri>. The install step reads that location from the target property, so it follows the move.QTP0004is set toNEWfor the modules whose.qmlfiles sit in a subdirectory:MorphForms, the forms demo andbank_gui. It is guarded for Qt versions that predate the policy.lims desktop client. Every mutating lims action refuses an empty principal, and
ladder_lims_guibuilt its bridges without a session. SoRegisterClientand every other write failed with "mutating action dispatched with an empty principal".installDesktopSession()now lives in lims'sgui_lib.main.cppcalls it in local mode.🤖 Generated with Claude Code
https://claude.ai/code/session_0141t3QdB4FkiHqiCX2M2eF2