We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbbbdf0 commit ecf1597Copy full SHA for ecf1597
dfx/src/config/mod.rs
@@ -2,6 +2,11 @@ pub mod cache;
2
pub mod dfinity;
3
4
static mut DFX_VERSION: Option<String> = None;
5
+/// Returns the version of DFX that was built.
6
+/// In debug, add a timestamp of the upstream compilation at the end of version to ensure all
7
+/// debug runs are unique (and cached uniquely).
8
+/// That timestamp is taken from the DFX_TIMESTAMP_DEBUG_MODE_ONLY env var that is set in
9
+/// Nix.
10
pub fn dfx_version() -> &'static str {
11
unsafe {
12
match &DFX_VERSION {
@@ -11,8 +16,6 @@ pub fn dfx_version() -> &'static str {
16
17
#[cfg(debug_assertions)]
13
18
{
14
- // In debug, add a timestamp of the compilation at the end of version to ensure all
15
- // debug runs are unique (and cached uniquely).
19
DFX_VERSION = Some(format!(
20
"{}-{}",
21
version,
0 commit comments