Jump to content

Too many characters per line error


Xarbrough

Recommended Posts

Today I wanted to checkin a file with a relatively long line and got this error message:

image.thumb.png.4803f18a7b18ba01fd582d8a50b533ba.png

 

That shouldn't be an error, its a valid file. Ideally, UI and performance are both optimized so they can display arbitrarily large files. If one of these goals is too difficult to achieve in a reasonable time, then at least the error should be handled and displayed with an unobtrusive message on the diff view stating "the file contains lines which are too long to display here".

 

I have also attached the offending file. It's a Unity scene meta file which contains custom user data (in this case, a serialized preview thumbnail). It's not too uncommon to have files which are human readable (diffable) such as Unity YAML or Json and also have some blobs of binary data within those text files. Just think of JSON with custom payload or YAML with inline images.

Platform: Windows 10
Client: 10.0.16.6307 Camaron De La Isla

 

Thank you!

 

Edit: I also tested in the regular (non-PlasticX) client and there the error does not show. It correctly displays the long line in the diff view without any issues.

UI.unity.meta

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

@Xarbrough thanks for your feedback.

Yes, you're right this is annoying for certain files such as big SVGs, or minified javascript also. We're working on it.

We detected that AvaloniaEdit (which is the TextEditor we use to display text differences) doen't suppport lines longer than 10.000 characters per line. We're going to fix it in two ways:

  • Firstly, better handling that error in PlasticX.
  • Secondly, we will to avoid that restriction in AvaloniaEdit. We will try to skip long lines for tokenization, and probably trim long lines for visualization (something similar Visual Studio Code does).
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...