Skip to content
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

simple merge conflicts in notebooks require manually editing the ipynb json #160941

Closed
amunger opened this issue Sep 14, 2022 · 5 comments · Fixed by #213602
Closed

simple merge conflicts in notebooks require manually editing the ipynb json #160941

amunger opened this issue Sep 14, 2022 · 5 comments · Fixed by #213602
Assignees
Labels
feature-request Request for new features or functionality notebook-ipynb notebook-serialization papercut 🩸 A particularly annoying issue impacting someone on the team verification-needed Verification of issue is requested
Milestone

Comments

@amunger
Copy link
Contributor

amunger commented Sep 14, 2022

Locally I have an empty cell at the bottom of my notebook because I executed the last cell
When I try to merge in a change that has new cells, I get a merge conflict that requires I open the ipynb in a text editor to resolve.

image

@rebornix
Copy link
Member

We can explore how to handle this gracefully in the serializer.

@rebornix rebornix added feature-request Request for new features or functionality notebook-ipynb notebook-serialization labels Oct 21, 2022
@DonJayamanne
Copy link
Contributor

@rebornix not sure what needs to be done in the serializer here. can you provide more information, i would have thought this was purely an issue with merge conflicts.

@yohfdo
Copy link

yohfdo commented Nov 16, 2023

Can this please be solved? It's hard to work collaboratively within a team using Jupyter notebooks and VS Code if we can't sort out merge conflicts.

@DonJayamanne DonJayamanne added this to the Backlog milestone Dec 4, 2023
@DonJayamanne DonJayamanne assigned rebornix and unassigned DonJayamanne Dec 4, 2023
@amunger amunger added the papercut 🩸 A particularly annoying issue impacting someone on the team label Dec 14, 2023
@ttimasdf
Copy link

I suggest there be an option to disable the notebook renderer temporarily in all editors. git operates at the text level and when merge conflict happens, it will likely produce a malformed JSON file.

We now have an error message to notify users to fallback to text editor, but "resolve in merge editor" button still don't work.

image

@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label May 28, 2024
@DonJayamanne DonJayamanne added verification-needed Verification of issue is requested and removed unreleased Patch has not yet been released in VS Code Insiders labels May 28, 2024
@DonJayamanne
Copy link
Contributor

Note:

  • When there are merge conflicts, one will always have to open a plain text (json) editor to resolve the merge confligs
  • I.e. its not possible to use Notebook UI to resolve merge conflicts (at least not yet)

Steps to test

  • Ensure you have merge conflicts in a Notebook document
  • Open the SCM view, and click on the IPYNB file, and verify you can see the merge conflicts in plain text editor view
  • Click on the Resolve in Merge Editor button and verify you get the merge editor (again plain text), see here simple merge conflicts in notebooks require manually editing the ipynb json #160941 (comment)
  • When you have merge conflicts, try opening the ipynb file from the explorer view, if this fails verify you are displayed with an error message with the option to open the file in plain text view

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook-ipynb notebook-serialization papercut 🩸 A particularly annoying issue impacting someone on the team verification-needed Verification of issue is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants