v0.2.5-pre.010.fix.002
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/bootstrap.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
//! Config and Logging bootstrap for the desktop application.
|
||||
|
||||
@@ -49,7 +49,7 @@ pub(crate) fn config_management(arguments: &[std::ffi::OsString]) -> ksp_core_li
|
||||
pub(crate) fn initialize_logging(
|
||||
management: &ksp_config_lib::ConfigManagement,
|
||||
runtime_identity: &ksp_logging_lib::LoggingRuntimeIdentity,
|
||||
) -> ksp_core_lib::Result<LoggingStartup> {
|
||||
) -> ksp_core_lib::Result<crate::LoggingStartup> {
|
||||
let plan = resolve_logging_startup(management);
|
||||
return match plan {
|
||||
LoggingStartupPlan::Managed { active_profile_id, settings } => {
|
||||
@@ -110,7 +110,7 @@ fn fallback_startup_plan(initial_error: ksp_core_lib::Error) -> LoggingStartupPl
|
||||
fn initialize_fallback_logging(
|
||||
initial_error: ksp_core_lib::Error,
|
||||
runtime_identity: &ksp_logging_lib::LoggingRuntimeIdentity,
|
||||
) -> ksp_core_lib::Result<LoggingStartup> {
|
||||
) -> ksp_core_lib::Result<crate::LoggingStartup> {
|
||||
let diagnostic = crate::CommandErrorDto::from_error(&initial_error);
|
||||
return initialize_planned_fallback_logging(initial_error, diagnostic, fallback_logging_settings(), runtime_identity);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ fn initialize_planned_fallback_logging(
|
||||
diagnostic: crate::CommandErrorDto,
|
||||
settings: ksp_logging_lib::LoggingSettings,
|
||||
runtime_identity: &ksp_logging_lib::LoggingRuntimeIdentity,
|
||||
) -> ksp_core_lib::Result<LoggingStartup> {
|
||||
) -> ksp_core_lib::Result<crate::LoggingStartup> {
|
||||
let guard = ksp_logging_lib::initialize_with_identity(&settings, runtime_identity);
|
||||
let guard = match guard {
|
||||
std::result::Result::Ok(value) => value,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/documents.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! Generic Config document inventory, diagnostics and validated repair services.
|
||||
|
||||
@@ -148,7 +148,7 @@ pub(crate) fn save_document_source(
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(ConfigDocumentErrorDto::from_error(&error)),
|
||||
};
|
||||
let document = detail(state, file_id.as_str());
|
||||
let document = crate::document_detail(state, file_id.as_str());
|
||||
let document = match document {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/environment.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Safe Config environment reports and `.env` management projections for Config Desk.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/profiles.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Safe Config profile inspection and provenance projections for Config Desk.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/tw_main.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Tauri-window helpers for the Config Desk main window.
|
||||
|
||||
@@ -22,7 +22,7 @@ pub(crate) fn require_main_window(manager: &impl Manager<tauri::Wry>) -> ksp_cor
|
||||
|
||||
/// Shows main window.
|
||||
pub(crate) fn show_main_window(app: &tauri::AppHandle) -> ksp_core_lib::Result<()> {
|
||||
let window = require_window(app);
|
||||
let window = crate::require_main_window(app);
|
||||
let window = match window {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/src/tw_splash.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
//! Tauri-window lifecycle for the Config Desk splash window.
|
||||
|
||||
@@ -8,6 +8,7 @@ use tauri::Manager; // rust-rules: trait-import
|
||||
|
||||
/// Crate-internal `WINDOW_LABEL_SPLASH` constant.
|
||||
pub(crate) const WINDOW_LABEL_SPLASH: &str = "splash";
|
||||
|
||||
const SPLASH_EVENT_NAME: &str = "ksp-splash-order";
|
||||
|
||||
/// Resolves the required splash window or returns a typed error.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/unit_tests/environment.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
#[test]
|
||||
fn namespace_projection_distinguishes_ksp_and_kspb_sensitivity_families() {
|
||||
@@ -53,7 +53,7 @@ fn committed_environment_report_is_safe_and_deterministic_when_present() {
|
||||
let management = committed_management();
|
||||
assert!(management.is_ok(), "committed management should construct: {management:?}");
|
||||
if let std::result::Result::Ok(management) = management {
|
||||
let report = crate::environment_report_from_management(&management);
|
||||
let report = super::report_from_management(&management);
|
||||
assert!(report.is_ok(), "environment report should project safely: {report:?}");
|
||||
if let std::result::Result::Ok(report) = report {
|
||||
let mut previous = std::option::Option::<&str>::None;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/unit_tests/logging_editor.rs
|
||||
// version: 6
|
||||
// version: 7
|
||||
|
||||
#[test]
|
||||
fn committed_logging_document_maps_complete_read_only_editor_contract() {
|
||||
@@ -8,7 +8,7 @@ fn committed_logging_document_maps_complete_read_only_editor_contract() {
|
||||
if let std::result::Result::Ok(management) = management {
|
||||
let source = management.load_logging_document();
|
||||
assert!(source.is_ok(), "typed Logging source should load: {source:?}");
|
||||
let document = crate::logging_document_from_management(&management);
|
||||
let document = super::document_from_management(&management);
|
||||
assert!(document.is_ok(), "Logging editor document should load: {document:?}");
|
||||
if let (std::result::Result::Ok(source), std::result::Result::Ok(document)) = (source, document) {
|
||||
assert_eq!(document.file_id, ksp_config_lib::FILE_ID_STD_LOGGING);
|
||||
@@ -63,7 +63,7 @@ fn editor_candidate_round_trips_through_typed_config_contract() {
|
||||
let management = committed_management();
|
||||
assert!(management.is_ok(), "committed management should construct: {management:?}");
|
||||
if let std::result::Result::Ok(management) = management {
|
||||
let document = crate::logging_document_from_management(&management);
|
||||
let document = super::document_from_management(&management);
|
||||
assert!(document.is_ok(), "Logging editor document should load: {document:?}");
|
||||
if let std::result::Result::Ok(document) = document {
|
||||
let candidate = crate::LoggingDocumentCandidateDto {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// file: crates/ksp-app-config-desk/unit_tests/profiles.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
#[test]
|
||||
fn profile_inventory_exposes_registered_standard_profile_documents() {
|
||||
let management = fixture_management();
|
||||
assert!(management.is_ok(), "fixture management should construct: {management:?}");
|
||||
if let std::result::Result::Ok(management) = management {
|
||||
let inventory = crate::profile_inventory_from_management(&management);
|
||||
let inventory = super::inventory_from_management(&management);
|
||||
assert!(inventory.is_ok(), "profile inventory should resolve: {inventory:?}");
|
||||
if let std::result::Result::Ok(inventory) = inventory {
|
||||
assert!(inventory.iter().any(|document| -> bool {
|
||||
@@ -32,7 +32,7 @@ fn default_profile_detail_uses_safe_effective_value_and_dotenv_provenance() {
|
||||
if let std::result::Result::Ok(management) = management {
|
||||
let source = management.load_logging_document();
|
||||
assert!(source.is_ok(), "typed Logging source should load: {source:?}");
|
||||
let detail = crate::profile_detail_from_management(&management, ksp_config_lib::FILE_ID_STD_LOGGING, std::option::Option::None);
|
||||
let detail = super::detail_from_management(&management, ksp_config_lib::FILE_ID_STD_LOGGING, std::option::Option::None);
|
||||
assert!(detail.is_ok(), "default profile should inspect safely: {detail:?}");
|
||||
if let (std::result::Result::Ok(source), std::result::Result::Ok(detail)) = (source, detail) {
|
||||
assert_eq!(detail.selected_profile, source.default_profile());
|
||||
@@ -60,8 +60,7 @@ fn explicit_profile_inspection_reports_explicit_selection_source() {
|
||||
assert!(source.is_ok(), "typed Logging source should load: {source:?}");
|
||||
if let std::result::Result::Ok(source) = source {
|
||||
let profile_id = source.default_profile().to_owned();
|
||||
let detail =
|
||||
crate::profile_detail_from_management(&management, ksp_config_lib::FILE_ID_STD_LOGGING, std::option::Option::Some(profile_id.as_str()));
|
||||
let detail = super::detail_from_management(&management, ksp_config_lib::FILE_ID_STD_LOGGING, std::option::Option::Some(profile_id.as_str()));
|
||||
assert!(detail.is_ok(), "explicit profile should inspect: {detail:?}");
|
||||
if let std::result::Result::Ok(detail) = detail {
|
||||
assert_eq!(detail.selected_profile, profile_id);
|
||||
|
||||
Reference in New Issue
Block a user