Skip to content

user prompting to select a variable name for multiple matches#39

Merged
kpgriesser merged 1 commit intoiconsolefrom
findvariable-iconsole
Jan 27, 2026
Merged

user prompting to select a variable name for multiple matches#39
kpgriesser merged 1 commit intoiconsolefrom
findvariable-iconsole

Conversation

@kpgriesser
Copy link
Collaborator

@kpgriesser kpgriesser commented Jan 27, 2026

The original prototype for ObjectMap::findVariable does not handle the case when multiple matches are found. With this change, the user (by default) will be prompted. This can be disabled using "confirm false" in the console which will revert to the prototype functionality of simply selecting the first match.

This edit should be removed by ensuring the object map has unique variable names ( and not use std::multimap )... presumably. Additionally, the confirm information will only be passed into the cd_cmd function so all other calls to findVariable may result in prompting the user. This is by design, as I am hoping we can uniquely the variable names and avoid the use of std::multimap altogether.

Duplicate names can occur at the same level of hierarchy when using sub-components. The one example I know if is creating a variable in a subcomponent name that has the same name as the subcomponent slot it populates. See example in tactcomplabs/sst-ext-tests#99

…match is found. This can be disabled using "confirm false" in the console which will revert to the prototype functionality of simply selecting the first match. This should be removed by ensuring the object map has unique variable names ( and not use std::multimap )... presumably
@github-actions
Copy link

CLANG-FORMAT TEST - FAILED (on last commit):
Run > ./scripts/clang-format-test.sh using clang-format v20 to check formatting

std::string SimpleDebugger::replayFilePath = "sst-console.in";
bool SimpleDebugger::enLogging = false;
bool SimpleDebugger::confirm = true;
bool SimpleDebugger::confirm_ = true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have members using the '_' suffix convention. I added it here as I thought I had a name conflict (which I didn't) but left it in anyway

Copy link
Collaborator

@jleidel jleidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@skuntz skuntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kpgriesser kpgriesser merged commit 4e1249a into iconsole Jan 27, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants