Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Cannot compile on macOS #6

Closed
lilyball opened this issue Feb 5, 2019 · 4 comments
Closed

Cannot compile on macOS #6

lilyball opened this issue Feb 5, 2019 · 4 comments

Comments

@lilyball
Copy link

lilyball commented Feb 5, 2019

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
Copy link
Author

lilyball commented Feb 5, 2019

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
Copy link
Owner

mre commented Feb 5, 2019

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
Copy link
Owner

mre commented Feb 5, 2019

🎉 010fa5d

@mre
Copy link
Owner

mre commented Feb 5, 2019

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

@mre mre closed this as completed Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants