microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.
Apache License 2.0
510 stars 97 forks source link

Breaking change in 11.3.2: Symbol.Display is gone #124

Closed davidnx closed 11 months ago

davidnx commented 1 year ago

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?

mattwar commented 11 months ago

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.