mre / prettyprint

Beautifully formatted output for your terminal 🌈
Apache License 2.0
200 stars 10 forks source link

Cannot compile on macOS #6

Closed lilyball closed 5 years ago

lilyball commented 5 years ago

This crate can't compile on stock macOS¹ due to inheriting a dependency on OpenSSL from the git2 crate. I expect you have no need for networking with git, so turning off the default features on the git2 crate will fix this.

¹Installing OpenSSL via Homebrew may work around this, but I don't use Homebrew so I can't check.

lilyball commented 5 years ago

After applying the following diff, cargo build now succeeds:

diff --git a/Cargo.toml b/Cargo.toml
index 310f0bd..8ce6454 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,9 +31,12 @@ console = "0.6.2"
 content_inspector = "0.2.4"
 directories = "1.0.2"
 encoding = "0.2.33"
-git2 = "0.7.5"
 shell-words = "0.1.0"
 syntect = "3.0.2"
 lazy_static = "1.2.0"
 atty = "0.2.11"
 derive_builder = "0.7.0"
+
+[dependencies.git2]
+version = "0.7.5"
+default-features = false
mre commented 5 years ago

Turns out I don't even need git2 at all. :trollface: That was just a remainder of bat's diff feature. So we can get rid of it completely. Will push that change and release a new version. Thanks for reporting @lilyball.

mre commented 5 years ago

🎉 https://github.com/mre/prettyprint/commit/010fa5d2e8c4f8920727df98114ffc9b2f80826e

mre commented 5 years ago

Published. Thanks for reporting this. ⭐️ cargo-inspect should now compile on macOS without openssll. See release notes.