-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
order of json dicts not preserved in jupyter notebooks save files #129435
Comments
note: if anyone else has this issue, these lines give a workaround:
use it like this (maybe make a backup first to be sure): |
@DonJayamanne IIRC we used to sort the keys in the notebook JSON to avoid creating noise like this (at least for the webview implementation). We should probably continue to do that moving forward |
(Experimental duplicate detection) |
Oh yes, looks like we aren't doing that. |
Is there code for this that got lost in moving to builtin? I thought I remembered that but didn't see code for it, if you point me to it I can port it over |
It looks like that function isn't called anywhere from vscode-jupyter though |
Yes, as Joyce mentioned we're not using it. This was used in the old custom editor. |
@DonJayamanne already implemented this, thanks |
Environment data
Commit: c3f1263
Date: 2021-07-14T22:30:16.440Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.4.0-80-generic snap
Expected behaviour
Make a small change, see only the change in git
Actual behaviour
Make a small change, the whole file is changed according to git (order of json dict entries is suddenly changed)
Steps to reproduce:
Logs
Output for
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)The text was updated successfully, but these errors were encountered: