Skip to content

Commit

Permalink
fix: update Tari-common crate feature flags to exclude git2 from li…
Browse files Browse the repository at this point in the history
…b_wallet build (#3072)

This PR adds a feature flag to the Tari-common crate so that the git2
dependency can be excluded from he building of Core. This dependency contains a
C dependency (libgit2) that breaks the LibWallet build.
  • Loading branch information
stringhandler committed Jul 9, 2021
2 parents 966268a + c583a54 commit a54d87f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion applications/tari_app_utilities/Cargo.toml
Expand Up @@ -32,4 +32,4 @@ default-features = false
features = ["transactions"]

[build-dependencies]
tari_common = { path = "../../common", features = ["build"] }
tari_common = { path = "../../common", features = ["build", "static-application-info"] }
3 changes: 2 additions & 1 deletion common/Cargo.toml
Expand Up @@ -10,7 +10,8 @@ version = "0.9.0"
edition = "2018"

[features]
build=["toml", "git2", "anyhow", "prost-build"]
build=["toml", "anyhow", "prost-build"]
static-application-info=["git2"]

[dependencies]
structopt = { version = "0.3.13", default_features = false }
Expand Down
4 changes: 4 additions & 0 deletions common/src/build/mod.rs
Expand Up @@ -20,8 +20,12 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#[cfg(feature = "static-application-info")]
mod application;
#[cfg(feature = "static-application-info")]
pub use application::StaticApplicationInfo;

#[cfg(feature = "build")]
mod protobuf;
#[cfg(feature = "build")]
pub use protobuf::ProtobufCompiler;
2 changes: 1 addition & 1 deletion common/src/lib.rs
Expand Up @@ -76,7 +76,7 @@
//! # std::fs::remove_dir_all(temp_dir).unwrap();
//! ```

#[cfg(feature = "build")]
#[cfg(any(feature = "build", feature = "static-application-info"))]
pub mod build;
#[macro_use]
mod logging;
Expand Down

0 comments on commit a54d87f

Please sign in to comment.