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

Conversation

taiki-e
Copy link

@taiki-e taiki-e commented Dec 26, 2021

Fixes #1991

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.

@taiki-e
Copy link
Author

taiki-e commented Dec 26, 2021

It seems tests are failing due to OOM.

https://github.com/sharkdp/bat/runs/4636833103?check_suite_focus=true

running 44 tests
test assets::build_assets::acknowledgements::tests::test_append_to_acknowledgements_adds_newline_if_missing ... ok
test assets::build_assets::acknowledgements::tests::test_normalize_license_text ... ok
test assets::build_assets::acknowledgements::tests::test_normalize_license_text_with_windows_line_endings ... ok
memory allocation of 7881122326526296064 bytes failederror: test failed, to rerun pass '--lib'

Caused by:
  process didn't exit successfully: `/home/runner/work/bat/bat/target/debug/deps/bat-5f7ebdce0ebb4f19` (signal: 6, SIGABRT: process abort signal)

@taiki-e
Copy link
Author

taiki-e commented Dec 26, 2021

closing -- syntect 4.7.0 has been yanked: trishume/syntect#402 (comment)

@taiki-e taiki-e closed this Dec 26, 2021
@taiki-e taiki-e deleted the syntect branch December 26, 2021 16:48
@sharkdp
Copy link
Owner

sharkdp commented Jan 3, 2022

Thank you anyway for taking a stab at this!

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.

v0.18.3 not building with Rust 1.57 on Linux x64
2 participants