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

Strip dependencies of bat-as-a-library #899

Merged
merged 4 commits into from
Mar 31, 2020
Merged

Strip dependencies of bat-as-a-library #899

merged 4 commits into from
Mar 31, 2020

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented Mar 30, 2020

Fixes #895. This PR introduces a features = ["application"] which is enabled by default and pulls in everything required by bat the application. When depending on bat as a library, downstream Cargo.toml should disable this feature to cut out inapplicable heavy dependencies like liquid.

[dependencies]
bat = { version = "0.13", default-features = false }

I've put some other optional functionality behind features as well: paging and git support, neither of which I would want for cargo-expand.

src/config.rs Show resolved Hide resolved
src/errors.rs Outdated Show resolved Hide resolved
src/output.rs Outdated Show resolved Hide resolved
@sharkdp
Copy link
Owner

sharkdp commented Mar 30, 2020

Thank you very much! This looks great 👍

@sharkdp
Copy link
Owner

sharkdp commented Mar 31, 2020

Thank you for the updates.

Note that we still pull in clap as a dependency via syntect=>onig=>onig_sys=>bindgen (https://github.com/rust-lang/rust-bindgen/blob/f568d095774bd5642fe8404e13268e43bd47327a/Cargo.toml#L50-L51). But this could be resolved by upgrading to syntect 4.1.0 and making it possible to use fancy-regex as you suggested in #896.

@sharkdp sharkdp merged commit 42e3825 into sharkdp:master Mar 31, 2020
@sharkdp
Copy link
Owner

sharkdp commented Mar 31, 2020

But this could be resolved by upgrading to syntect 4.1.0 and making it possible to use fancy-regex as you suggested in #896.

See #900

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.

Remove binary-specific dependencies from bat library
2 participants