Xcode8 - indentation keystroke loses its mind, destroys my code

Originator:markd
Number:rdar://27631844 Date Originated:7/31/2016
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.0 beta 3 (8S174q)
Classification:UI/Usability Reproducible:Sometimes
 
Summary:
see attached movie.  The project as seen at the end of video is attached.

I see this fairly often, unfortunately i didn't get the lead up captured on screen recording (after filing 10 xcode radars so far today, I was hoping I was done. So yeah, I had a great weekend working on personal projects for fun, how about you?)

But sometimes the editor gets in to a state where indenting the code (whether via control-I, or the Structure->Re-Indent command) destroys code - it moves things around, inserts weirdness, and flat-out removes code.

I hope this behavior isn't acceptable in a programmer's editor.

I had an email conversation with *redacted* back in January about this exact problem.  I'm willing to forward that conversation to someone.  It has some attachments and animated gifs.

That particular iissue seemed to be related to newlines vs carriage returns from copy and pasted code from outside of Xcode. (but only after Xcode had been running for a while.  Closing the project and re-opening and things behaved correctly)

This time everything was purely inside of Xcode.  No outside editors involved.

SourceKit has not crashed - all of my syntax colors are black, due to my vision correction.

Steps to Reproduce:


Expected Results:
Code doesn't get destroyed.

Actual Results:


Version:
Version 8.0 beta 3 (8S174q)
10.11.5 (15F34)


Notes:
I was going to paste my usual "when these kinds of things happen day-in, day-out, it's just another heavy-sigh blah blah blah" signature - but stuff that actively corrupts code?  That takes me from just disliking a tool to really being unable to trust it.

Configuration:


Attachments:
'confused-death.mp4' and 'MyFatnessPal.zip' were successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!