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

Parsing of multi-line strings fails #154

Open
davfre opened this issue Oct 26, 2023 · 0 comments
Open

Parsing of multi-line strings fails #154

davfre opened this issue Oct 26, 2023 · 0 comments

Comments

@davfre
Copy link

davfre commented Oct 26, 2023

delta-kusto throws an error on multi-line strings surrounded by triple ```

Version: delta-kusto 0.15.1.128

.create-or-alter function myFunction() {
    let multi_line_string = ```
        The code below has a complex logic,
        as explained in this multi-line string
        
        E=MC^2
     ```;
    < function logic >
}

Stack trace: at DeltaKustoLib.CommandModel.CreateFunctionCommand.TrimFunctionSchemaBody(String body)
at DeltaKustoLib.CommandModel.CreateFunctionCommand.FromCode(SyntaxElement rootElement)
at DeltaKustoLib.CommandModel.CommandBase.CreateCommand(String script, KustoCode code, Boolean ignoreUnknownCommands)
at DeltaKustoLib.CommandModel.CommandBase.ParseAndCreateCommand(String script, Boolean ignoreUnknownCommands)
Exception encountered: DeltaKustoLib.DeltaException ; Issue parsing script
Stack trace: at DeltaKustoLib.CommandModel.CommandBase.ParseAndCreateCommand(String script, Boolean ignoreUnknownCommands)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.ToArray()
at System.Collections.Immutable.ImmutableArray.CreateRangeT
at DeltaKustoLib.CommandModel.CommandBase.FromScript(String script, Boolean ignoreUnknownCommands)
at DeltaKustoIntegration.Kusto.KustoManagementGateway.DeltaKustoIntegration.Kusto.IKustoManagementGateway.ReverseEngineerDatabaseAsync(CancellationToken ct)
at DeltaKustoIntegration.Database.KustoDatabaseProvider.DeltaKustoIntegration.Database.IDatabaseProvider.RetrieveDatabaseAsync(CancellationToken ct)
at delta_kusto.DeltaOrchestration.RetrieveDatabaseAsync(IDatabaseProvider currentDbProvider, String db)
at delta_kusto.DeltaOrchestration.ProcessJobAsync(MainParameterization parameters, IKustoManagementGatewayFactory kustoGatewayFactory, IFileGateway localFileGateway, String jobName, JobParameterization job)
Exception encountered: System.InvalidOperationException ; Function body was expected to be surrounded by curly brace but isn't: {
let multi_line_string = ```

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

No branches or pull requests

1 participant