Skip to content

Commit

Permalink
[x] move to a new devtools/ directory
Browse files Browse the repository at this point in the history
I want to split out the lint engine into its own crate -- `devtools/` is
where it will live.

Closes: diem#3351
Approved by: rexhoffman
  • Loading branch information
sunshowers authored and bors-libra committed Apr 9, 2020
1 parent dac3a34 commit d9a4c03
Show file tree
Hide file tree
Showing 19 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ members = [
"consensus/safety-rules",
"crypto/crypto",
"crypto/crypto-derive",
"devtools/x",
"execution/executor",
"execution/executor-benchmark",
"execution/executor-types",
Expand Down Expand Up @@ -105,7 +106,6 @@ members = [
"testsuite/generate-format",
"types",
"vm-validator",
"x",
]

# NOTE: These members should never include crates that require fuzzing
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion x/src/utils.rs → devtools/x/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ use crate::{cargo::Cargo, Result};
use serde::Deserialize;
use std::path::{Path, PathBuf};

/// The number of directories between the project root and the root of this crate.
pub const X_DEPTH: usize = 2;

pub fn project_root() -> &'static Path {
Path::new(&env!("CARGO_MANIFEST_DIR"))
.ancestors()
.nth(1)
.nth(X_DEPTH)
.unwrap()
}

Expand Down

0 comments on commit d9a4c03

Please sign in to comment.