Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider autoscoped name when looking up dynamic config #9916

Merged
merged 4 commits into from
May 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ const inheritedConfig = computed(() => {
if (props.input.dynamicConfig?.kind === 'OneOfFunctionCalls' && methodCallInfo.value != null) {
const cfg = props.input.dynamicConfig
const info = methodCallInfo.value
const name = entryQn(info?.suggestion)
return cfg.possibleFunctions.get(name)
const fullName = entryQn(info?.suggestion)
const autoscopedName = '..' + info?.suggestion.name
return cfg.possibleFunctions.get(fullName) ?? cfg.possibleFunctions.get(autoscopedName)
Copy link
Contributor

@Frizi Frizi May 10, 2024

Choose a reason for hiding this comment

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

Should we always check autoscoped name here, or is supposed to be limited only to cases where the suggestion is an enum constructor?

Also I think this logic change should be included in possibleFunctions property documentation. It no longer typically contains only FQNs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we always check autoscoped name here, or is supposed to be limited only to cases where the suggestion is an enum constructor?

There is no harm in doing it every time we can.

Also I think this logic change should be included in possibleFunctions property documentation. It no longer typically contains only FQNs.

Added note there.

}
return undefined
})
Expand Down
Loading