syntect breaking changes

cargo

18 curated breaking changes across major versions of syntect. Use this as a migration checklist before bumping dependencies.

18
changes
Breaking changes by transition
  • v4.7.1 \u2192 v5.0.0breaking

    Lazy-load syntaxes to significantly improve startup time. This changes the binary format of syntax dump files.

  • v4.7.1 \u2192 v5.0.0breaking

    Remove `ContextId::new()` from public API to support lazy-loading of syntaxes

  • v4.7.1 \u2192 v5.0.0breaking

    Rename `HighlightLines::highlight()` to `HighlightLines::highlight_line()` to make it clear that the function takes one line at a time

  • v4.7.1 \u2192 v5.0.0breaking

    Make `plist` dependency (used for loading themes) optional via new `plist-load` feature

  • v4.7.1 \u2192 v5.0.0breaking

    Remove obsolete `dump-load-rs` and `dump-create-rs` features that has been identical to `dump-load` and `dump-create` for two years

  • v3.3.0 \u2192 v4.0.0breaking

    **Edit March 30:** If you generate custom pack files and want to use fancy-regex you need to regenerate them. The binary format is the same but at YAML loading time regex rewrites get applied that make fancy-regex work properly.

  • v3.3.0 \u2192 v4.0.0breaking

    If you use `default-features = false` you may need to update your features to choose a regex engine

  • v3.3.0 \u2192 v4.0.0breaking

    A bunch of technically public APIs that I don't know if anyone uses changed due to the regex engine refactor, common uses shouldn't break

  • v2.1.0 \u2192 v3.0.0breaking

    The `SyntaxSet` API has been revamped to use a builder and an arena of contexts. See [example usage](https://github.com/trishume/syntect/blob/51208d35a6d98c07468fbe044d5c6f37eb129205/examples/gendata.rs#L25-L28).

  • v2.1.0 \u2192 v3.0.0breaking

    Many functions now need to be passed the `SyntaxSet` that goes with the rest of their arguments because of this new arena.

  • v2.1.0 \u2192 v3.0.0breaking

    Filename added to `LoadingError::ParseSyntax`

  • v2.1.0 \u2192 v3.0.0breaking

    Many functions in the `html` module now take the `newlines` version of syntaxes.

  • v2.1.0 \u2192 v3.0.0breaking

    These methods have also been renamed, partially so that code that needs updating doesn't break without a compile error.

  • v1.8.2 \u2192 v2.0.0breaking

    The `static-onig` feature was removed, static linking is now the default

  • v1.8.2 \u2192 v2.0.0breaking

    Font styles and color constants now use associated consts because of bitflags upgrade

  • v1.8.2 \u2192 v2.0.0breaking

    SyntaxDefinition::load_from_str now has an extra parameter Other notable changes:

  • v1.8.2 \u2192 v2.0.0breaking

    Support for new `embed` syntax #124

  • v1.8.2 \u2192 v2.0.0breaking

    Updates to many dependencies

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/cargo/syntect
syntect breaking changes — Cargo migration guide | DepScope