refactor(workspace/mod): selective re-exports with multi-word commands (ADR-025 L3)

workspace/mod.nu had 9 `export use X *`. Each is now an explicit symbol list.

New pattern encountered: three files export Nu multi-word subcommands
(`export def "workspace activate"`, `export def "workspace list"`, etc.).
These are re-exported with Nu's quoted-string syntax in the selective list:

  export use commands.nu [
      "workspace activate" "workspace active" "workspace list" ...
  ]

Symbol counts per target:
  init.nu            3
  config_commands.nu 6
  commands.nu       14  (all multi-word "workspace X")
  verify.nu          2
  helpers.nu        13
  version.nu        11
  enforcement.nu     7
  migration.nu       9
  sync.nu            3  (all multi-word "workspace X")

Total: 68 symbols, 17 quoted multi-word commands.

Validation:
  nu --ide-check 50 workspace/mod.nu -> 0 errors, 0 warnings

Refs: ADR-025, .coder/benchmarks/phase2-transitivity.md Layer 3
This commit is contained in:
Jesús Pérez 2026-04-17 08:07:39 +01:00
parent baf74b5395
commit 5efd0426d8
Signed by: jesus
GPG key ID: 9F243E355E0BC939

View file

@ -1,10 +1,44 @@
# Workspace module exports
export use init.nu *
export use config_commands.nu *
export use commands.nu *
export use verify.nu *
export use helpers.nu *
export use version.nu *
export use enforcement.nu *
export use migration.nu *
export use sync.nu *
# workspace/ subsystem facade — selective re-exports (ADR-025 Phase 3 Layer 3).
# Each `export use X *` replaced by explicit symbol list. Multi-word Nu
# subcommands (e.g. "workspace activate") are quoted per Nu syntax.
export use init.nu [provisioning_init show_titles use_titles]
export use config_commands.nu [
workspace-config-edit workspace-config-generate-provider
workspace-config-hierarchy workspace-config-list workspace-config-show
workspace-config-validate
]
export use commands.nu [
"workspace activate" "workspace active" "workspace check-compatibility"
"workspace get-preference" "workspace list" "workspace list-backups"
"workspace migrate" "workspace preferences" "workspace register"
"workspace remove" "workspace restore-backup" "workspace set-preference"
"workspace switch" "workspace version"
]
export use verify.nu [main verify-workspace-architecture]
export use helpers.nu [
build-deployment-config check-deployment-health check-platform-availability
check-prerequisites confirm-deployment create-deployment-manifests
generate-secrets get-installer-path load-config-from-file
rollback-deployment save-deployment-config validate-deployment-config
validate-deployment-params
]
export use version.nu [
add-migration-record check-workspace-compatibility compare-versions
get-system-version get-version-summary get-workspace-metadata-path
init-workspace-metadata is-version-compatible load-workspace-metadata
save-workspace-metadata validate-workspace-structure
]
export use enforcement.nu [
check-and-enforce command-requires-workspace display-enforcement-error
enforce-workspace-requirement get-current-workspace-info
get-workspace-exempt-commands preflight-check
]
export use migration.nu [
create-workspace-backup execute-migration find-migration-path
get-migration-strategies list-workspace-backups migrate-2_0_0-to-2_0_5
migrate-unknown-to-2_0_5 migrate-workspace restore-workspace-from-backup
]
export use sync.nu [
"workspace check-updates" "workspace sync-modules" "workspace update"
]