MCPcopy Create free account
hub / github.com/PRQL/prql / compiler_version_str

Function compiler_version_str

prqlc/prqlc/src/cli/mod.rs:98–101  ·  view source on GitHub ↗

This seems to be required because passing `compiler_version()` directly to `command` fails because it's not a string, and we can't seem to convert it to a string inline.

()

Source from the content-addressed store, hash-verified

96/// `command` fails because it's not a string, and we can't seem to convert it
97/// to a string inline.
98pub fn compiler_version_str() -> &'static str {
99 static COMPILER_VERSION: std::sync::OnceLock<String> = std::sync::OnceLock::new();
100 COMPILER_VERSION.get_or_init(|| compiler_version().to_string())
101}
102
103#[derive(Subcommand, Debug, Clone)]
104#[command(name = env!("CARGO_PKG_NAME"), about, version=compiler_version_str())]

Callers

nothing calls this directly

Calls 1

compiler_versionFunction · 0.85

Tested by

no test coverage detected