Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
The version field defines the version of the software the bug was found in. [ID: 1154637]
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
What steps will reproduce the problem?
1. Modify a file that is more than 500000 bytes large
2. Commit file
3. Push commit to Gerrit as a change
4. Open the modified file in Gerrit's web diff viewer
What is the expected output?
At the very least an alert indicating that syntax highlighting will not be performed which is what you get if you add a line that is more than 500 characters long. But ideally I'd also get a syntax highlighted file.
What do you see instead?
Instead there is no syntax highlighting and no indication for why there is no highlighting (unlike the line length limit case or the file line count case).
Please provide any additional information below.
This change surprised us a bit after our upgrade to Gerrit 3.6. It seems to have been introduced by 00b8c359eb4589c432e945f8d2b8e00366a17f82 in this file polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts, then in dec4396c4c5a6389fc44b05c20f7a49ed457ec21 it gets moved to this file: polygerrit-ui/app/services/highlight/highlight-service.ts.
This behavior is problematic for a couple of reasons. The first is that 3.6 was already warning about lines being too long in polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts giving users an indication for why this sort of thing can happen. It silently happening when the file has too many bytes in it created significant confusion. The other reason this is problematic is that these values are hardcoded despite us all having different browser capabilities. It would be nice if users could increase these limits if their browsers can handle it.
Finally, the changes that implemented this change indicated release notes weren't required, but our users noticed, and I spent a good chunk of time debugging this behavior. I think release notes should be made for user facing changes of behavior.