Skip to content

Say that duplicate SubTree names are checked across the whole tree - #1222

Open
dv-picknik wants to merge 1 commit into
BehaviorTree:masterfrom
dv-picknik:fix/1219-duplicate-subtree-message
Open

dv-picknik wants to merge 1 commit into
BehaviorTree:masterfrom
dv-picknik:fix/1219-duplicate-subtree-message

Conversation

@dv-picknik

Copy link
Copy Markdown

Fixes #1219.

The duplicate SubTree error said SubTrees with the same name "under the same parent" are not allowed. The check compares full SubTree paths, and control nodes like Sequence aren't part of a path, so two same-named SubTrees under different parents collide as well. The message now says so:

Duplicate SubTree path detected: 'my_task'. SubTree nodes in the same tree cannot share a 'name' attribute, even under different parent nodes. Please use unique names or omit the 'name' attribute to auto-generate unique paths.

The check itself is unchanged. Making it sibling-scoped would need parent nodes in the path, which changes every SubTree and node path and reopens Groot2 issue #56.

SubTree.DuplicateSubTreeName_DifferentParents fails on master and passes with this change. The full suite passes, and so does pre-commit.

🤖 Generated with Claude Code

…ixes BehaviorTree#1219)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Duplicate SubTree path error says "under the same parent" but also fires across parents

1 participant