-
Notifications
You must be signed in to change notification settings - Fork 406
Description
Describe the bug
The kernelName and language show as csharp in the created Untitled-1.ipynb contents which only contains a single cell of type "F#".
Note: It's a regression issue. It doesn't repro on - VSCodeUserSetup-arm64-1.81.1 + dotnet-interactive-vscode-1.0.4454011.vsix + dotnet-sdk-7.0.400-win-x64.
Detailed Repro Build info: VSCodeSetup-x64-1.83.1 +dotnet-interactive-vscode-1.0.4514021.vsix+ dotnet-sdk-7.0.402-win-x64
VS Code: https://update.code.visualstudio.com/1.83.1/win32-x64/stable
Version: 1.83.1 (system setup)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.25398
dotnet-interactive-vscode-1.0.4514021.vsix
Build link: https://dev.azure.com/dnceng/internal/_build/results?buildId=2291238&view=artifacts&pathAsName=false&type=publishedArtifacts
Steps:
1.Open the notebook from https://github.com/dotnet/interactive/blob/main/NotebookTestScript.dib.
2.Ctrl+Shift+P` => "Polyglot Notebook: Create new blank notebook"
3.Select "Create as .ipynb"
4.Select "F#"
5.You should have a new empty notebook named something like "Untitled-1.ipynb" with a single cell of type "F# (Polyglot Notebook)".
6.Set the cell contents to 1+1 and execute.
7. Save to disk.
8. Open that file in notepad.
9. Check the contents of Untitled-1.ipynb
Expected Results:
The kernelName and language should be fsharp in the created Untitled-1.ipynb contents.
Actual Results:
The kernelName and language show as csharp in the created Untitled-1.ipynb contents.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"dotnet_interactive": {
"language": "fsharp"
},
"polyglot_notebook": {
"kernelName": "fsharp"
}
},
"outputs": [
{
"data": {
"text/html": [
"<div class="dni-plaintext">
2<style>\r\n",
".dni-code-hint {\r\n",
" font-style: italic;\r\n",
" overflow: hidden;\r\n",
" white-space: nowrap;\r\n",
"}\r\n",
".dni-treeview {\r\n",
" white-space: nowrap;\r\n",
"}\r\n",
".dni-treeview td {\r\n",
" vertical-align: top;\r\n",
" text-align: start;\r\n",
"}\r\n",
"details.dni-treeview {\r\n",
" padding-left: 1em;\r\n",
"}\r\n",
"table td {\r\n",
" text-align: start;\r\n",
"}\r\n",
"table tr { \r\n",
" vertical-align: top; \r\n",
" margin: 0em 0px;\r\n",
"}\r\n",
"table tr td pre \r\n",
"{ \r\n",
" vertical-align: top !important; \r\n",
" margin: 0em 0px !important;\r\n",
"} \r\n",
"table th {\r\n",
" text-align: start;\r\n",
"}\r\n",
"</style>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"1+1"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".NET (C#)",
"language": "C#",
"name": ".net-csharp"
},
"language_info": {
"name": "polyglot-notebook"
},
"polyglot_notebook": {
"kernelInfo": {
"defaultKernelName": "csharp",
"items": [
{
"aliases": [],
"name": "csharp"
},
{
"aliases": [],
"languageName": "fsharp",
"name": "fsharp"
}
]
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about
magic command. ):
- OS
- [√] Windows 11
- Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- [√] Visual Studio Code
- Visual Studio Code Insiders
- Visual Studio
- Other (please specify)
Screenshots
If applicable, add screenshots to help explain your problem.