refactor(setup): selective imports in wizard/system/platform (ADR-025 L2)
Three setup/ files converted from star-imports to selective imports with absolute paths. All three follow the same pattern (4 stars each -> selective), bundled in one commit since they share the same dependency surface. setup/wizard.nu: setup/mod.nu [11 symbols — detection/print helpers] setup/detection.nu [4 symbols — deployment capabilities + report] utils/path-utils.nu [get-typedialog-form-path] setup/validation.nu DROPPED (0 used symbols — dead import) setup/system.nu: setup/mod.nu [17 symbols — ensure-config-dirs + print + sys info + save] setup/wizard.nu [3 symbols — run-*] utils/nickel_processor.nu [ncl-eval-soft] (kept, already selective) setup/detection.nu DROPPED (0 used) setup/validation.nu DROPPED (0 used) setup/platform.nu: setup/mod.nu [11 symbols — print + sys info + save/load TOML] setup/detection.nu [5 symbols — has-docker/kubectl/...] platform/bootstrap.nu [bootstrap-platform] setup/validation.nu DROPPED (0 used) Validation (all 3): nu --ide-check 50 -> 0 errors, matches baseline. Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 2
This commit is contained in:
parent
b551554519
commit
aeff136164
3 changed files with 36 additions and 13 deletions
|
|
@ -2,10 +2,17 @@
|
||||||
# Manages deployment and initialization of platform services (Orchestrator, Control Center, KMS)
|
# Manages deployment and initialization of platform services (Orchestrator, Control Center, KMS)
|
||||||
# Follows Nushell guidelines: explicit types, single purpose, no try-catch
|
# Follows Nushell guidelines: explicit types, single purpose, no try-catch
|
||||||
|
|
||||||
use ./mod.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./detection.nu *
|
# setup/validation.nu star-import was dead — dropped.
|
||||||
use ./validation.nu *
|
use lib_provisioning/setup/mod.nu [
|
||||||
use ../platform/bootstrap.nu *
|
get-config-base-path get-cpu-count get-system-memory-gb
|
||||||
|
get-timestamp-iso8601 load-config-toml print-setup-error print-setup-header
|
||||||
|
print-setup-info print-setup-success print-setup-warning save-config-toml
|
||||||
|
]
|
||||||
|
use lib_provisioning/setup/detection.nu [
|
||||||
|
has-docker has-docker-compose has-kubectl has-ssh has-systemd
|
||||||
|
]
|
||||||
|
use lib_provisioning/platform/bootstrap.nu [bootstrap-platform]
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# DEPLOYMENT MODE VALIDATION
|
# DEPLOYMENT MODE VALIDATION
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,19 @@
|
||||||
# Orchestrates complete provisioning system setup and initialization
|
# Orchestrates complete provisioning system setup and initialization
|
||||||
# Follows Nushell guidelines: explicit types, single purpose, no try-catch
|
# Follows Nushell guidelines: explicit types, single purpose, no try-catch
|
||||||
|
|
||||||
use ./mod.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./detection.nu *
|
# setup/detection.nu and setup/validation.nu star-imports were dead — dropped.
|
||||||
use ./validation.nu *
|
use lib_provisioning/setup/mod.nu [
|
||||||
use ./wizard.nu *
|
detect-architecture detect-os ensure-config-dirs get-config-base-path
|
||||||
use ../utils/nickel_processor.nu [ncl-eval-soft]
|
get-cpu-count get-current-user get-system-disk-gb get-system-hostname
|
||||||
|
get-system-memory-gb get-timestamp-iso8601 print-setup-error
|
||||||
|
print-setup-header print-setup-info print-setup-success print-setup-warning
|
||||||
|
save-config-toml save-config-yaml
|
||||||
|
]
|
||||||
|
use lib_provisioning/setup/wizard.nu [
|
||||||
|
run-minimal-setup run-setup-with-defaults run-setup-wizard
|
||||||
|
]
|
||||||
|
use lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft]
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# SYSTEM CONFIGURATION CREATION
|
# SYSTEM CONFIGURATION CREATION
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,18 @@
|
||||||
# version = "3.0.0"
|
# version = "3.0.0"
|
||||||
# requires = ["nushell:0.109.0"]
|
# requires = ["nushell:0.109.0"]
|
||||||
|
|
||||||
use ./mod.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ./detection.nu *
|
# setup/validation.nu star-import was dead (no used symbols) — dropped.
|
||||||
use ./validation.nu *
|
use lib_provisioning/setup/mod.nu [
|
||||||
use ../utils/path-utils.nu *
|
detect-architecture detect-os get-config-base-path get-cpu-count
|
||||||
|
get-current-user get-system-memory-gb print-setup-error print-setup-header
|
||||||
|
print-setup-info print-setup-success print-setup-warning
|
||||||
|
]
|
||||||
|
use lib_provisioning/setup/detection.nu [
|
||||||
|
get-deployment-capabilities get-existing-config-summary
|
||||||
|
print-detection-report recommend-deployment-mode
|
||||||
|
]
|
||||||
|
use lib_provisioning/utils/path-utils.nu [get-typedialog-form-path]
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# INPUT HELPERS
|
# INPUT HELPERS
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue