Skip to content

Commit ad736df

Browse files
committed
add warning
1 parent 075e6ed commit ad736df

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

dsc_lib/locales/en-us.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ notFound = "Environment variable not found"
201201
conditionNotBoolean = "Condition is not a boolean"
202202

203203
[functions.format]
204+
experimental = "`format()` function is experimental"
204205
formatInvalid = "First `format()` argument must be a string"
205206
numberTooLarge = "Number is too large"
206207
invalidArgType = "Unsupported argument type"

dsc_lib/src/functions/format.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::functions::{AcceptedArgKind, Function};
77
use rt_format::{Format as RtFormat, FormatArgument, ParsedFormat, argument::NoNamedArguments};
88
use rust_i18n::t;
99
use serde_json::Value;
10+
use tracing::warn;
1011

1112
#[derive(Debug, PartialEq)]
1213
enum Variant {
@@ -95,6 +96,7 @@ impl Function for Format {
9596
}
9697

9798
fn invoke(&self, args: &[Value], _context: &Context) -> Result<Value, DscError> {
99+
warn!("{}", t!("functions.format.experimental"));
98100
let Some(format_string) = args[0].as_str() else {
99101
return Err(DscError::Parser(t!("functions.format.formatInvalid").to_string()));
100102
};

0 commit comments

Comments
 (0)