interactive
interactive copied to clipboard
Creating a new F# notebook switches initial cell to C# after saving
Describe the bug
- Open Visual Studio Code
- Create a new blank notebook
- Select "Create as '.dib'" (note: this bug doesn't happen if the
.ipynbformat is selected at this step) - Select "F#" as default language
- Note that the initial cell is an F# cell
- Save the notebook to disk
- Note that the initial cell has now switched to a C# cell
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):
Version: 1.0.340501+e6a4bd71118e0f7b202c761dd208cfa38bd5683b
Library version: 1.0.0-beta.22405.1+e6a4bd71118e0f7b202c761dd208cfa38bd5683b
Build date: 2022-08-12T03:08:59.0408371Z
- OS
- [x] Windows 11
- [ ] Windows 10
- [ ] macOS
- [ ] Linux (Please specify distro)
- [ ] iOS
- [ ] Android
- Browser
- [ ] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari
- Frontend
- [ ] Jupyter Notebook
- [ ] Jupyter Lab
- [ ] nteract
- [x] Visual Studio Code
- [ ] Visual Studio Code Insiders
- [ ] Visual Studio
- [ ] Other (please specify)
Screenshots
If applicable, add screenshots to help explain your problem.
Gave this a quick shot today and this only repros if the first cell is empty. We also coalesce multiple empty cells and reset the language to C#. While the coalescing makes sense, we would want to review why we reset the language.
As a note, I have realized this only happens when creating .dib notebooks and not .ipynb notebooks.
This may be related to https://github.com/dotnet/interactive/issues/1324
In Visual Studio it happens for .ipynb too
https://marketplace.visualstudio.com/items?itemName=MLNET.notebook
Like I described in https://github.com/dotnet/interactive/issues/1827
Closed as duplicate of #2289
How are they connected?
They relate to a bug in document metadata handling causing default languages to changedDr Diego Colombo PhDOn 27 Sep 2022, at 18:38, Andrii Chebukin @.***> wrote: How are they connected?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>
Ah, sorry. I was not attentive enough