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

lg:analyze should allow passing in information about external functions #1220

@chrimc62

Description

@chrimc62

Is your feature request related to a problem? Please describe.
If you write your own expressions in code you can register and use them in LG templates. When running lg:analyze it will fail because it does not have the code registrations. A good example of this is found in form generation where there are two custom functions that are used.

C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates>bf lg:analyze --in standard
[Error] C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates\generator.lg line 455:0 - line 455:129: Error occurred when parsing expression 'substitutions(
    `form-operations.${locale}.data`,
    substitutionScope(utterances, entityValues(values), label),
    5)'. substitutions does not have an evaluator, it's not a built-in function or a custom function.
[Error] C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates\generator.lg line 555:6 - line 555:26: Error occurred when parsing expression 'phrases(property)'. phrases does not have an evaluator, it's not a built-in function or a custom function.

Describe the solution you'd like
You should be able to pass in the list of external functions as an argument.

Describe alternatives you've considered
A flag to prevent an error would not be as good, but would be OK.

[enhancement]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: LGLanguage generation issuesneeds-triageThe issue has just been created and it has not been reviewed by the team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions