Bug 459825 - syntax-highlighting 5.98.0 breaks kate/ktexteditor from 2018
Summary: syntax-highlighting 5.98.0 breaks kate/ktexteditor from 2018
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: framework (show other bugs)
Version: 5.98.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-29 16:17 UTC by nfxjfg
Modified: 2022-10-02 09:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nfxjfg 2022-09-29 16:17:23 UTC
SUMMARY

I'm using kate/ktexteditor from 2018 (ktexteditor f06e83281268701 / kate 2641fc835e5fecb5, version 18.03.70). When upgrading from syntax-highlighting framework release 5.97.0 to 5.98.0, highlighting of C source files broke in a stranger way: after the first number token (like 123), the rest of the line is rendered in red, and braces matching stops working for that line. This happens with source code text that parses as number in C. (Numeric digits embedded in string literals don't cause it.) It seems to affect any and all tokens that follow the number.

I've built 5.97.0 locally for kate (so only the ancient kate accesses it), and it works again.

There is no such problem with kate 22.04.3.

While using ancient kate may seem absurd to you, syntax-highlighting probably accidentally broke compatibility in a subtle way, that might affect other users of this framework.

STEPS TO REPRODUCE
1. Build old kate/ktexteditor (git hashes see above) with syntax-highlighting 5.98.0. I can't find the instructions how to do this properly, though.
2. Open any .c source file, using the standard C syntax highlighter. (I have no local syntax .xml files from what I can tell, in fact I wonder where these files are located at all.)

OBSERVED RESULT

Renders like with 5.97.0, nothing strange visible.

EXPECTED RESULT

Text following a number token is rendered red, until the line ends.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: no KDE running
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Comment 1 nfxjfg 2022-09-29 16:18:29 UTC
> syntax-highlighting probably accidentally broke compatibility in a subtle way, that might affect other users of this framework.

Correction: or ancient kate used the API incorrectly, or a breaking API change occurred.
Comment 2 Christoph Cullmann 2022-10-02 09:50:36 UTC
Mixing frameworks versions is not supported, if you update syntax-highlighting, please update ktexteditor, too.
We will not spend work on making different mixed versions working.
And even for the application, using a 4 year old version with more or less the latest frameworks is no supported use case we will debug.