microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breaking change in 11.3.2: Symbol.Display is gone

davidnx opened this issue · comments

Property string Symbol.Display is missing in Microsoft.Azure.Kusto.Language 11.3.2 (it was still available and wasn't marked as Obsolete in 11.3.1).

Was this intentional?
TypeSymbol.Display, OperatorSymbol.Display, FunctionSymbol.Display, ColumnSymbol.Display were useful in many cases, especially when debugging and when generating runtime error messages.

What is a good replacement for it, since Symbol.ToString() doesn't produce a useful value?

This was removed intentionally. The Display property was meant to be only for being displayed by the debugger and not be depended on by other logic. However, by its name it was not clear what it meant or was used for and too many other features had grown dependent on it. Those features have been decoupled from it. It has been switched to a private property (DebugText) that is still accessible by the debugger to show.

If you are needing a value to place in an exception you should use the Symbol.Name property.

If you want a more detailed text instead of just the name of the symbol there are other options:

  1. Kusto.Language.Editor.CompletionDisplay.GetText() is available to produce the text that is shown for the symbol in completion lists.
  2. Kusto.Language.Symbols.SchemaDisplay.GetText() will produce the text of type symbols as they would be represented in the language.