Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Conversation

@Danieladu
Copy link
Contributor

Issue: microsoft/BotFramework-Composer#3982
C# pr: microsoft/botbuilder-dotnet#4724

Description

Originally, the injection of LG function into Expression require a namespace option. If there is no namespace option, a absolute path is require. It is too strict.

Specific Changes

Loose the namespace fallback policy. The priority order is:

  1. If there is a namespace option, use it
  2. If there is an un-empty id, parse the file name from the id, and get the namespace
  3. If the Id is empty, just drop the namespace and use the template name as the expression name directly.

For example:
If there is an option in LG file, like:

> !# @Namespace = general

general is the namespace, the export function could be presented as general.xxx

If there does not exist a namespace option, use the name of Id by default, for example:
If the id is: ./a.lg -> a is the namespace, a.xxx is the expression name
if the id is: abc -> abc is the namespace, abc.xxx is the expression name
If the is is empty string, just drop the namespace, and use template name directly, xxx is the final expression name

@Danieladu Danieladu requested a review from a team as a code owner October 9, 2020 03:20
@Danieladu Danieladu requested review from luhan2017 and tomlm October 9, 2020 03:20
@Danieladu Danieladu merged commit 1b0a7d2 into main Oct 9, 2020
@Danieladu Danieladu deleted the hond/namespace branch October 9, 2020 07:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants