Bug 1945648 - Remove MOZ_BUILDID from the mozbuild crate r=pehrsons,glandium
This was causing dependents of mozbuild to be rebuilt often and unnecessarily. Differential Revision: https://phabricator.services.mozilla.com/D237105
This commit is contained in:
@@ -36,11 +36,6 @@ source-repo.h: $(MDDEPDIR)/source-repo.h.stub
|
||||
buildid.h: $(MDDEPDIR)/buildid.h.stub
|
||||
# Add explicit dependencies that moz.build can't declare yet.
|
||||
build/$(MDDEPDIR)/application.ini.stub: source-repo.h buildid.h
|
||||
# The mozbuild crate includes the buildid (via `variables.py:get_buildid()`),
|
||||
# so it can only be generated after the buildid file is generated.
|
||||
ifeq ($(and $(JS_STANDALONE),$(MOZ_BUILD_APP)),)
|
||||
build/rust/mozbuild/$(MDDEPDIR)/buildconfig.rs.stub: buildid.h
|
||||
endif
|
||||
|
||||
BUILD_BACKEND_FILES := $(addprefix backend.,$(addsuffix Backend,$(BUILD_BACKENDS)))
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import string
|
||||
import textwrap
|
||||
|
||||
import buildconfig
|
||||
from variables import get_buildid
|
||||
|
||||
|
||||
def generate_bool(name):
|
||||
@@ -80,20 +79,6 @@ def generate(output):
|
||||
)
|
||||
)
|
||||
|
||||
# buildid.h is only available in these conditions (see the top-level moz.build)
|
||||
if not buildconfig.substs.get("JS_STANDALONE") or not buildconfig.substs.get(
|
||||
"MOZ_BUILD_APP"
|
||||
):
|
||||
output.write(
|
||||
textwrap.dedent(
|
||||
f"""
|
||||
/// The build id of the current build.
|
||||
pub const MOZ_BUILDID: &str = {escape_rust_string(get_buildid())};
|
||||
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
windows_rs_dir = buildconfig.substs.get("MOZ_WINDOWS_RS_DIR")
|
||||
if windows_rs_dir:
|
||||
output.write(
|
||||
|
||||
@@ -93,6 +93,3 @@ $(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/
|
||||
# that are not supported by data in moz.build.
|
||||
|
||||
$(TOPOBJDIR)/build/.deps/application.ini.stub: $(TOPOBJDIR)/buildid.h $(TOPOBJDIR)/source-repo.h
|
||||
ifeq ($(and $(JS_STANDALONE),$(MOZ_BUILD_APP)),)
|
||||
$(TOPOBJDIR)/build/rust/mozbuild/.deps/buildconfig.rs.stub: $(TOPOBJDIR)/buildid.h
|
||||
endif
|
||||
|
||||
@@ -54,7 +54,8 @@ fn glean_data_dir(_cfg: &Config) -> ::std::path::PathBuf {
|
||||
|
||||
fn client_info_metrics(cfg: &Config) -> ClientInfoMetrics {
|
||||
glean::ClientInfoMetrics {
|
||||
app_build: mozbuild::config::MOZ_BUILDID.into(),
|
||||
// We can't get the build id at compile time; see bug 1945648.
|
||||
app_build: env!("CARGO_PKG_VERSION").into(),
|
||||
app_display_version: env!("CARGO_PKG_VERSION").into(),
|
||||
channel: None,
|
||||
locale: cfg.strings.as_ref().map(|s| s.locale()),
|
||||
|
||||
Reference in New Issue
Block a user