Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add context_aware_warnings setting
XXX- The default setting of this and thread_inherit_context should be
true.
  • Loading branch information
fanninpm authored and youknowone committed Jan 18, 2026
commit 7f791a02fcac40b66d4fc7fc32d21998ccbb91db
3 changes: 3 additions & 0 deletions crates/vm/src/stdlib/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,8 @@ mod sys {
warn_default_encoding: u8,
/// -X thread_inherit_context, whether new threads inherit context from parent
thread_inherit_context: bool,
/// -X context_aware_warnings, whether warnings are context aware
context_aware_warnings: bool,
}

impl FlagsData {
Expand All @@ -1327,6 +1329,7 @@ mod sys {
safe_path: settings.safe_path,
warn_default_encoding: settings.warn_default_encoding as u8,
thread_inherit_context: settings.thread_inherit_context,
context_aware_warnings: settings.context_aware_warnings,
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/vm/src/vm/setting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ pub struct Settings {
/// -X thread_inherit_context, whether new threads inherit context from parent
pub thread_inherit_context: bool,

/// -X context_aware_warnings, whether warnings are context aware
pub context_aware_warnings: bool,

/// -i
pub inspect: bool,

Expand Down Expand Up @@ -194,6 +197,7 @@ impl Default for Settings {
dev_mode: false,
warn_default_encoding: false,
thread_inherit_context: false,
context_aware_warnings: false,
warnoptions: vec![],
path_list: vec![],
argv: vec![],
Expand Down