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

Prepare for 5.0.0: Update CHANGELOG.md and version #409

Merged
merged 6 commits into from Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 37 additions & 12 deletions CHANGELOG.md
@@ -1,27 +1,52 @@
# Changelog

## [Version 4.7.1](https://github.com/trishume/syntect/compare/v4.7.0...v4.7.1) (2022-01-xx)
## [Version 5.0.0](https://github.com/trishume/syntect/compare/v4.6.0...v5.0.0) (2022-01-xx)

- Remove 'plist-load' feature again due to semver violation. [#403](https://github.com/trishume/syntect/pull/403)
Breaking changes

This version was removed from crates.io due to the semver violation issue.

## [Version 4.7.0](https://github.com/trishume/syntect/compare/v4.6.0...v4.7.0) (2021-12-25)

- Lazy-load syntaxes to significantly improve startup time
- Replace lazycell with once_cell to fix crash on lazy initialization
- 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.51.
- Make 'plist' dependency (used for loading themes) optional via new 'plist-load' feature
- 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
- 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()`

This version was removed from crates.io due to the semver violation issue.
## [Version 4.7.1](https://github.com/trishume/syntect/compare/v4.7.0...v4.7.1) (2022-01-03)

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

## [Version 4.7.0](https://github.com/trishume/syntect/compare/v4.6.0...v4.7.0) (2021-12-25)

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

## [Version 4.6.0](https://github.com/trishume/syntect/compare/v4.5.0...v4.6.0) (2021-08-01)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -7,7 +7,7 @@ keywords = ["syntax", "highlighting", "highlighter", "colouring", "parsing"]
categories = ["parser-implementations", "parsing", "text-processing"]
readme = "Readme.md"
license = "MIT"
version = "4.7.1" # remember to update html_root_url
version = "5.0.0" # remember to update html_root_url
authors = ["Tristan Hume <tristan@thume.ca>"]
edition = "2018"
exclude = [
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -23,7 +23,7 @@ I consider this project mostly complete, I still maintain it and review PRs, but
`syntect` is [available on crates.io](https://crates.io/crates/syntect). You can install it by adding this line to your `Cargo.toml`:

```toml
syntect = "4.6"
syntect = "5.0"
```

After that take a look at the [documentation](https://docs.rs/syntect) and the [examples](https://github.com/trishume/syntect/tree/master/examples).
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -19,7 +19,7 @@
//! [`parsing`]: parsing/index.html
//! [`highlighting`]: highlighting/index.html

#![doc(html_root_url = "https://docs.rs/syntect/4.7.1")]
#![doc(html_root_url = "https://docs.rs/syntect/5.0.0")]

#[macro_use]
extern crate lazy_static;
Expand Down