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

Use a new version of the forked syntect #968

Merged
merged 2 commits into from
Jan 1, 2025
Merged

Use a new version of the forked syntect #968

merged 2 commits into from
Jan 1, 2025

Conversation

Canop
Copy link
Owner

@Canop Canop commented Dec 30, 2024

This fork doesn't panic on non compiling regexes.

Fix #967

The reason the fork is needed is that syntect panics when a regex from a syntax can't compile, which happens with sublime syntaxes when the engine isn't onig but fancy-regex.

The default regex engine of syntect is onig, but this unmaintained engine isn't pure-rust and isn't compatible with gcc 15, which limits compatibility for broot. So, right now, this fork is useful to prevent crashes.

The ideal solution would be either to have syntect completely handle regex compiling errors without panic (which looks easily doable but requires some work and may not appear as the best behavior for some other crates using syntect) and|or to have fancy-regex support all the regex features that are required by sublime syntaxes.

See also:

@Canop Canop merged commit e516208 into main Jan 1, 2025
1 check passed
@Canop Canop deleted the issue-967 branch January 1, 2025 09:01
@NoisyCoil
Copy link

Hi @Canop. Is the creation of a new fork (syntect-5-no-panic) really necessary? Can't the same be achieved by uploading a new version of the old fork (syntect-no-panic)?

In terms of packaging for distros, introducing a new dependency can take a lot of time (between weeks and months) and effort, while a simple update can usually be dealt with instantly.

@Canop
Copy link
Owner Author

Canop commented Jan 2, 2025

I didn't think this would be a problem. I'll revert to the old name.

@Canop
Copy link
Owner Author

Canop commented Jan 2, 2025

@NoisyCoil
Copy link

@Canop Thanks a lot!

@NoisyCoil
Copy link

@Canop Could you please publish 1.44.5 to crates.io too?

@Canop
Copy link
Owner Author

Canop commented Jan 2, 2025

@NoisyCoil done

@NoisyCoil
Copy link

@Canop Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when previewing seemingly innocent JavaScript text file
2 participants