hal: Update halcmd to use the HAL query API and remove linkpp - #4269
Merged
Conversation
grandixximo
reviewed
Jul 27, 2026
BsAtHome
force-pushed
the
halgs_halcmd-update
branch
from
July 27, 2026 09:51
5f25407 to
539ff1a
Compare
Contributor
Author
|
@grandixximo Pushed the update. Have a look. |
Contributor
|
lgtm |
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.
This PR updates halcmd to use the HAL query API instead of hooking directly into HAL's private data structures. This update also touches the Tcl side (while building tcl/hal.so), which uses the same source files as halcmd.
Several functions in halcmd had their
char *arguments changed toconst char *. Also, some static buffers used with snprintf have been removed and replaced with std::string and fmt::format.Interactive halcmd is supposed to use readline. However, this has been non-functional ever since the library got changed from libreadline into libedit. The changed define was not taken into account. This has been fixed and both interactive history and tab-completion work again. There are still problems in interactive mode, like exiting if a command fails instead of returning to the interactive prompt. That must be sorted out later.
There is no functional change, except a very small one in the halcmd save command. There was a trailing space when saving components. This space has been removed and the test (tests/save.0) has been updated.
This PR also removes the linkpp command, as discussed and fixes #4265.