Closed diemoschwarz closed 4 months ago
What happens when you python3 -m json.tool diffbad.maxpat
?
python3 -m json.tool diffbad.maxpat
Expecting property name enclosed in double quotes: line 57 column 1 (char 1235)
Yes. This is an invalid file that the Python standard library json
module that is unable to parse.
@diemoschwarz I think it should be possible to show a warning in the diff if there are merge conflict markers in a file, instead of failing completely. Good point!
Hi @diemoschwarz, I've gotten around to proposing a fix for this issue in this PR: https://github.com/Ableton/maxdevtools/pull/33
I wonder if you would have time to give it a look and let me know if this is what you would expect?
It happens that git produces merge conflict marks in patches. This causes maxdiff to bail. It should probably default to raw file output, maybe with a warning inserted at the top? Or can the json parsing be recovered, just ignoring the broken dicts?
diffbad.maxpat.zip
/sw/bin/python3 /Users/schwarz/src/maxdevtools-ableton/maxdiff/maxpat_textconv.py diffbad.maxpat