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

Fix build error with syntect 4.7.0 #1992

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ optional = true
default-features = false

[dependencies.syntect]
version = "4.6.0"
version = "4.7.0"
default-features = false
features = ["parsing"]
features = ["parsing", "plist-load", "dump-load"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the dump-load (or dump-load-rs) feature is not specified, the following error is happen. It seems another bug of syntect.

error[E0425]: cannot find function `from_reader` in module `crate::dumps`
   --> /Users/taiki/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-4.7.0/src/parsing/syntax_set.rs:432:23
    |
432 |         crate::dumps::from_reader(data).expect("data is not corrupt or out of sync with the code")
    |                       ^^^^^^^^^^^ not found in `crate::dumps`
    |
help: consider importing one of these items
    |
1   | use plist::from_reader;
    |
1   | use serde_json::from_reader;
    |

For more information about this error, try `rustc --explain E0425`.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this seems to be a breaking change introduced in trishume/syntect#393.

https://github.com/trishume/syntect/blob/b4e2cbb280c79cc5a3b3c12f342d6b792f905001/Cargo.toml#L62-L64

# If you enable "parsing", you must also enable either "dump-load" or
# "dump-load-rs", and "dump-create" or "dump-create-rs". Otherwise the code that
# enables lazy-loading of syntaxes will not compile.


[dependencies.clap]
version = "2.34"
Expand Down