Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Highlighting Broken #6643

Closed
SimplyDanny opened this issue Dec 19, 2023 · 11 comments
Closed

Swift Highlighting Broken #6643

SimplyDanny opened this issue Dec 19, 2023 · 11 comments
Labels

Comments

@SimplyDanny
Copy link

SimplyDanny commented Dec 19, 2023

With the v7.28.0 release, the syntax highlighting for Swift code makes some files unreadable. See this file in the SwiftLint repository as an example.

Many parts get a red background color in dark mode, which makes it very hard to work with them, especially when the confusing highlighting takes action in code reviews where only a small (red) part is visible. My current solution is to review the changes locally which is uncomfortable.

If a quick fix cannot be found, I'd vote for a rollback to the previous Swift grammar.

FYI: @jtbandes

@jtbandes
Copy link
Contributor

Looks like with this file you are encountering a combination of jtbandes/swift-tmlanguage#13 & jtbandes/swift-tmlanguage#7

@SimplyDanny
Copy link
Author

Looks like with this file you are encountering a combination of jtbandes/swift-tmlanguage#13 & jtbandes/swift-tmlanguage#7

Yes, it seems like. This is especially a serious problem for SwiftLint where almost all files contain string blocks in one or the other way.

@jtbandes
Copy link
Contributor

I'll try to resolve these soon but unfortunately I don't have a way of testing GitHub's highlighting aside from waiting for the next release (#6603 (comment)).

@lildude
Copy link
Member

lildude commented Dec 20, 2023

Closing as syntax highlighting issues should be opened on the upstream repos as per the troubleshooting doc.

@lildude lildude closed this as completed Dec 20, 2023
@SimplyDanny
Copy link
Author

Closing as syntax highlighting issues should be opened on the upstream repos as per the troubleshooting doc.

Fair enough. However, I opened the issue here because I propose to revert the change until the problems are fixed. It's really annoying to work on code reviews at the moment.

@jtbandes
Copy link
Contributor

As a temporary suggestion, if you are able to use the VS Code's GitHub integration to do code reviews, you might have a better experience as VS Code is able to use the same grammar without experiencing the errors.

@LePips
Copy link

LePips commented Dec 21, 2023

+1 to reverting until problems are fixed, it's been really hard to read code for the past little bit

@ZevEisenberg
Copy link

Another +1 to fixing or reverting this soon. It makes diffs like this pretty hard to understand:

image

@jtbandes
Copy link
Contributor

jtbandes commented Jan 2, 2024

The latest discussion on the potential issue with GitHub's highlighter has been happening on #6603, but @lildude I wonder if we should reopen this issue (or create a new one) to have a more discoverable place for discussion than on a merged PR?

@SimplyDanny
Copy link
Author

SimplyDanny commented Jan 21, 2024

Guys, really ... it has been over a month now that the highlighting is broken. I appreciate all your work and I very well know that a fix usually is not ready within a few minutes/hours/days. However, a simple revert to the previous state of the highlighter would have been perfectly sufficient to allow people to work with Swift code on GitHub again. Honestly, (re)viewing Swift code at the moment is simply impossible and has been for over a month.

I kindly ask you again to roll back the grammar change! 🙏

@lildude
Copy link
Member

lildude commented Jan 21, 2024

I kindly ask you again to roll back the grammar change! 🙏

This is out of my control as is not a problem with the grammar... it's a problem with the highlighting engine which coincided with the last release. Rolling back the release will make no difference. The team responsible for the highlighting engine is aware of the issue and looking into it.

Feel free to open a support ticket referencing #6668 if you want to add more to the known issue for passing on to the relevant team.

@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants