Skip to content

Commit ff664ac

Browse files
ldanilekConvex, Inc.
authored andcommitted
remove unused COMPILED_REVISION (#25319)
variable is unused so we don't need it and can stop rebuilding the metrics crate when the git sha changes GitOrigin-RevId: efdc1848c1b6c358b8455ee2bb38c957d6da6f2b
1 parent 3f5dcf1 commit ff664ac

File tree

6 files changed

+2
-38
lines changed

6 files changed

+2
-38
lines changed

Cargo.lock

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ tracy-client = { version = "0.16.0", default-features = false, features = [ "fib
132132
tungstenite = "0.20.0"
133133
url = "2"
134134
uuid = { version = "1.6", features = [ "serde", "v4" ] }
135-
vergen = { version = "8.1.0" }
136135
walkdir = "2"
137136
xorf = { git = "https://github.com/sujayakar/xorf.git", rev = "62a32de47bb3ad8b34d6d4feac034a24be2c881a" }
138137

crates/common/src/version.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ use std::{
99

1010
use cmd_util::env::env_config;
1111
use errors::ErrorMetadata;
12-
pub use metrics::{
13-
COMPILED_REVISION,
14-
SERVER_VERSION_STR,
15-
};
12+
pub use metrics::SERVER_VERSION_STR;
1613
pub use semver::Version;
1714
use serde::{
1815
Deserialize,

crates/metrics/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ prometheus = { workspace = true }
1717
sentry = { workspace = true }
1818
tracing = { workspace = true }
1919

20-
[build-dependencies]
21-
anyhow = { workspace = true }
22-
vergen = { workspace = true, features = ["git", "gitcl"] }
23-
2420
[features]
2521
testing = []
2622

crates/metrics/build.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
use std::env;
2-
3-
use vergen::EmitBuilder;
4-
5-
fn main() -> anyhow::Result<()> {
1+
fn main() {
62
println!("cargo:rerun-if-env-changed=PROFILE");
7-
println!("cargo:rerun-if-env-changed=FORCE_EMIT");
83
println!("cargo:rerun-if-env-changed=CONVEX_RELEASE_VERSION");
9-
10-
if cfg!(not(debug_assertions)) || env::var("FORCE_EMIT").is_ok() {
11-
// Emit git sha
12-
EmitBuilder::builder().git_sha(false).emit()?;
13-
} else {
14-
println!("cargo:rustc-env=VERGEN_GIT_SHA=dev");
15-
}
16-
17-
Ok(())
184
}

crates/metrics/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ fn initialize_server_version() -> String {
6969
}
7070
pub static SERVER_VERSION_STR: LazyLock<String> = LazyLock::new(initialize_server_version);
7171

72-
pub const COMPILED_REVISION: &str = env!("VERGEN_GIT_SHA");
73-
7472
register_convex_gauge!(
7573
CONVEX_BINARY_VERSIONS_TOTAL,
7674
"Gauge representing the existence of a certain process at a certain version, as indicated in \

0 commit comments

Comments
 (0)