Xarbrough Posted December 2, 2021 Report Share Posted December 2, 2021 Today I wanted to checkin a file with a relatively long line and got this error message: 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 1 Link to comment Share on other sites More sharing options...
vsanchezm Posted December 14, 2021 Report Share Posted December 14, 2021 Thank you for the feedback. We also detected this issue internally @Daniel Peñalba We will have a fix for this one next week! 1 Link to comment Share on other sites More sharing options...
Daniel Peñalba Posted December 16, 2021 Report Share Posted December 16, 2021 @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). 1 Link to comment Share on other sites More sharing options...
Daniel Peñalba Posted December 22, 2021 Report Share Posted December 22, 2021 @Xarbrough, we're currently working on it: https://github.com/AvaloniaUI/AvaloniaEdit/pull/172/ 1 Link to comment Share on other sites More sharing options...
Xarbrough Posted December 22, 2021 Author Report Share Posted December 22, 2021 Good progress, nice! Link to comment Share on other sites More sharing options...
vsanchezm Posted January 4, 2022 Report Share Posted January 4, 2022 Issue fixed! The fix will be included in the next release ☺️ Link to comment Share on other sites More sharing options...
Recommended Posts