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

build(deps): bump syntect from 4.6.0 to 5.0.0 #216

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 4, 2022

Bumps syntect from 4.6.0 to 5.0.0.

Release notes

Sourced from syntect's releases.

Breaking changes for improved startup time and error handling!

Thanks to @​Enselic for basically all the work to make this release happen!

Breaking changes

  • Lazy-load syntaxes to significantly improve startup time. This changes the binary format of syntax dump files.
  • Remove ContextId::new() from public API to support lazy-loading of syntaxes
  • Rename HighlightLines::highlight() to HighlightLines::highlight_line() to make it clear that the function takes one line at a time
  • Make plist dependency (used for loading themes) optional via new plist-load feature
  • Remove obsolete dump-load-rs and dump-create-rs features that has been identical to dump-load and dump-create for two years
  • Remove deprecated items ThemeSettings::highlight_foreground, ThemeSettings::selection_background, ClassedHTMLGenerator::new, ClassedHTMLGenerator::parse_html_for_line, html::css_for_theme, html::tokens_to_classed_html and html::tokens_to_classed_spans
  • Mark all error enums as #[non_exhaustive]
  • These functions have been changed to return a Result to allow propagation of errors:
    • html::ClassedHTMLGenerator::parse_html_for_line_which_includes_newline
    • html::append_highlighted_html_for_styled_line
    • html::css_for_theme_with_class_style
    • html::highlighted_html_for_string
    • html::line_tokens_to_classed_spans
    • html::styled_line_to_highlighted_html
    • parsing::ParseState::parse_line
    • parsing::ScopeStack::apply
    • parsing::ScopeStack::apply_with_hook
    • parsing::syntax_definition::Context::match_at
    • parsing::syntax_definition::ContextReference::id
    • parsing::syntax_definition::ContextReference::resolve

Other changes

  • Fall back to Plain Text if a referenced syntax is missing
  • Add support for hidden_file_extensions key in syntaxes.
  • Implement Error and Display for all error enums by using thiserror
  • Replace lazycell with once_cell to fix crash on lazy initialization
  • Add ScopeRangeIterator
  • Add CI check for Minimum Supported Rust Version. This is currently Rust 1.53.
  • Make looking up a syntax by extension use case-insensitive comparison
  • Make from_dump_file() ~15% faster
  • Blend alpha value on converting colors to ANSI color sequences
  • Fix sample code in documentation to avoid double newlines
  • Fix lots of build warnings and lints
  • Add Criterion benchmarks for a whole syntect pipeline and for from_dump_file()

Patch of v4.7.0 without the semver violations that broke things

See the release notes for v4.7.0, this release removes a new Cargo feature which constituted a semver violation:

  • Remove 'plist-load' feature again due to semver violation. #403

Much faster startup through lazy-loading, and much more!

Big release this time thanks to tons of fantastic contributions from @​Enselic, this release was basically all him! The headline feature is much faster startup time due to lazy-loading at the syntax level.

  • Lazy-load syntaxes to significantly improve startup time

... (truncated)

Changelog

Sourced from syntect's changelog.

Version 5.0.0 (2022-05-03)

Breaking changes

  • Lazy-load syntaxes to significantly improve startup time. This changes the binary format of syntax dump files.
  • Remove ContextId::new() from public API to support lazy-loading of syntaxes
  • Rename HighlightLines::highlight() to HighlightLines::highlight_line() to make it clear that the function takes one line at a time
  • Make plist dependency (used for loading themes) optional via new plist-load feature
  • Remove obsolete dump-load-rs and dump-create-rs features that has been identical to dump-load and dump-create for two years
  • Remove deprecated items ThemeSettings::highlight_foreground, ThemeSettings::selection_background, ClassedHTMLGenerator::new, ClassedHTMLGenerator::parse_html_for_line, html::css_for_theme, html::tokens_to_classed_html and html::tokens_to_classed_spans
  • Mark all error enums as #[non_exhaustive]
  • These functions have been changed to return a Result to allow propagation of errors:
    • html::ClassedHTMLGenerator::parse_html_for_line_which_includes_newline
    • html::append_highlighted_html_for_styled_line
    • html::css_for_theme_with_class_style
    • html::highlighted_html_for_string
    • html::line_tokens_to_classed_spans
    • html::styled_line_to_highlighted_html
    • parsing::ParseState::parse_line
    • parsing::ScopeStack::apply
    • parsing::ScopeStack::apply_with_hook
    • parsing::syntax_definition::Context::match_at
    • parsing::syntax_definition::ContextReference::id
    • parsing::syntax_definition::ContextReference::resolve

Other changes

  • Fall back to Plain Text if a referenced syntax is missing
  • Add support for hidden_file_extensions key in syntaxes.
  • Implement Error and Display for all error enums by using thiserror
  • Replace lazycell with once_cell to fix crash on lazy initialization
  • Add ScopeRangeIterator
  • Add CI check for Minimum Supported Rust Version. This is currently Rust 1.53.
  • Make looking up a syntax by extension use case-insensitive comparison
  • Make from_dump_file() ~15% faster
  • Blend alpha value on converting colors to ANSI color sequences
  • Fix sample code in documentation to avoid double newlines
  • Fix lots of build warnings and lints
  • Add Criterion benchmarks for a whole syntect pipeline and for from_dump_file()

Version 4.7.1 (2022-01-03)

This version was yanked from crates.io due to a semver violation issue.

Version 4.7.0 (2021-12-25)

This version was yanked from crates.io due to a semver violation issue.

Commits
  • e8c1f31 Release date for 5.0.0
  • 1184978 Merge pull request #409 from Enselic/prepare-for-5.0.0
  • a47dbdf Merge pull request #432 from Enselic/dont-panic
  • e8535c1 CHANGELOG.md: Update to include PR #432
  • dcd439e CHANGELOG.md: Update with latest changes on master
  • c7ee51e Merge remote-tracking branch 'origin/master' into prepare-for-5.0.0
  • 46882e1 Replace direct panics with Errors
  • 6b211f9 Merge pull request #419 from sourcegraph/vg/upstream/hidden-file-extensions
  • e54eef3 Add support for hidden_file_extensions key.
  • ce1ba5b Merge pull request #426 from Enselic/parse-and-highlight-line-with-result
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner May 4, 2022 13:28
@dependabot dependabot bot force-pushed the dependabot/cargo/syntect-5.0.0 branch from 576ca74 to fda8c22 Compare May 23, 2022 13:02
Bumps [syntect](https://github.com/trishume/syntect) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/trishume/syntect/releases)
- [Changelog](https://github.com/trishume/syntect/blob/master/CHANGELOG.md)
- [Commits](trishume/syntect@v4.6.0...v5.0.0)

---
updated-dependencies:
- dependency-name: syntect
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/syntect-5.0.0 branch from fda8c22 to 1e8462a Compare May 25, 2022 16:10
@jvanz
Copy link
Member

jvanz commented May 26, 2022

Why do we have this dependency?

syntect is a syntax highlighting library for Rust that uses [Sublime Text syntax definitions](http://www.sublimetext.com/docs/3/syntax.html#include-syntax). It aims to be a good solution for any Rust project that needs syntax highlighting, including deep integration with text editors written in Rust. It's used in production by at least two companies, and by [many open source projects](https://github.com/trishume/syntect#projects-using-syntect).

If you are writing a text editor (or something else needing highlighting) in Rust and this library doesn't fit your needs, I consider that a bug and you should file an issue or email me. I consider this project mostly complete, I still maintain it and review PRs, but it's not under heavy development.

@flavio
Copy link
Member

flavio commented May 26, 2022

This is coming as a transient dependency of mdbook. We use do that to render the markdown metadata of the policies

@flavio
Copy link
Member

flavio commented May 27, 2022

We cannot update it, because mdcat is using an old version of it and we can pass a v5.0.0 syntect object to mdcat which expectes a v4.5.0 one

@flavio flavio closed this May 27, 2022
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 27, 2022

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@flavio flavio deleted the dependabot/cargo/syntect-5.0.0 branch May 27, 2022 09:01
@flavio
Copy link
Member

flavio commented May 27, 2022

@dependabot ignore this major version

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 27, 2022

OK, I won't notify you about version 5.x.x again, unless you re-open this PR or update to a 5.x.x release yourself.

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

Successfully merging this pull request may close these issues.

None yet

2 participants