Skip to content

fix: add --parent, --include, --method flags to CLI source command#59

Open
thm-ma wants to merge 1 commit intooisee:mainfrom
thm-ma:fix/cli-source-parent-flag
Open

fix: add --parent, --include, --method flags to CLI source command#59
thm-ma wants to merge 1 commit intooisee:mainfrom
thm-ma:fix/cli-source-parent-flag

Conversation

@thm-ma
Copy link

@thm-ma thm-ma commented Mar 11, 2026

Problem

vsp source FUNC <name> failed with:

parent (function group name) is required for FUNC type

The --parent flag was missing from the CLI, even though the backend (GetSource) already supports it.

Fix

Added three missing flags to the source subcommand:

Flag Description Required for
--parent Function group name FUNC type
--include Class include type (definitions, implementations, macros, testclasses) CLAS type
--method Method name (returns only that METHOD...ENDMETHOD block) CLAS type

Before / After

Before

$ vsp source FUNC MY_FUNCTION_MODULE
Error: failed to get source: parent (function group name) is required for FUNC type

After

$ vsp source FUNC MY_FUNCTION_MODULE --parent MY_FUNCTION_MODULE_PARENT

FUNC type requires a parent (function group name) which was missing from
the CLI. Also expose --include and --method for CLAS parity with MCP.

Before: vsp source FUNC MY_FM  →  error: parent is required for FUNC type
After:  vsp source FUNC MY_FM --parent MY_FUGR  →  works

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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