jonsequitur / dotnet-repl

A polyglot REPL built on .NET Interactive
MIT License
730 stars 36 forks source link

Describe with #!set should detect the variable name instead of the prompt text #90

Closed marckruzik closed 11 months ago

marckruzik commented 12 months ago

I am using #!set to set a variable my_name in a notebook.

The notebook code:

#!set --name my_name --value @input:"please enter value"

The CLI command (working as intended):

dotnet repl --run test.dib --exit-after-run --input my_name="hello" --output-path output.ipynb

The bug

When using the describe command dotnet repl describe test.dib, it does not detect correctly the variable name. Instead, it detects the prompt text displayed to the user. Here is a screenshot with the variable name (1) and the name detected by describe (2): 2023_11_03-15h36m41s-C__Windows_System32_cmd exe

I think the variable name detected by describe (2) should be "my_name".

I am using dotnet-repl v0.1.205.

jonsequitur commented 11 months ago

This is a bug in Microsoft.DotNet.Interactive.Documents. I'm closing it here and have opened an issue here.

jonsequitur commented 11 months ago

Updating to the latest .NET Interactive libraries with the bug fix resolves the problem. I'll publish a new package shortly.

image