Skip to content

Commit bcc4525

Browse files
docs(Mountain): Streamline extension path and NodeResolver module docs
Simplify comments in ScanPathConfigure for extension skip flags and builtin path override to be more concise while preserving the technical details. Condense the NodeResolver module docstring from verbose prose to a compact ladder list showing the resolution order: LAND_NODE_BINARY → shipped runtime → fnm/volta/asdf/nvm → homebrew → PATH. The resolution behavior is unchanged, only the documentation format is improved for scannability.
1 parent f24e444 commit bcc4525

2 files changed

Lines changed: 13 additions & 30 deletions

File tree

Source/Binary/Extension/ScanPathConfigure.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ pub fn ScanPathConfigure(AppState:&std::sync::Arc<ApplicationState>) -> Result<V
4040
.map_err(MapLockError)
4141
.map_err(|e| format!("Failed to lock ExtensionScanPaths: {}", e))?;
4242

43-
// Atom J3: kernel / minimal profiles set LAND_SKIP_BUILTIN_EXTENSIONS=true
44-
// to ship without any bundled extensions. The user-extensions path
45-
// (`~/.land/extensions`) still scans so VSIX-installed extensions work.
46-
//
47-
// Atom U1: `.env.Land.Extensions` also exposes `LAND_DISABLE_BUILTIN_EXTENSIONS`
48-
// - same effect, different name. Accept both so the skill-file env and
49-
// the legacy SKIP flag don't diverge.
43+
// Skip all built-in extensions when either the legacy
44+
// `LAND_SKIP_BUILTIN_EXTENSIONS` or the `.env.Land.Extensions` flag
45+
// `LAND_DISABLE_BUILTIN_EXTENSIONS` is set. Both accepted so kernel /
46+
// minimal profiles and the skill-file env stay in sync. User scan path
47+
// still runs so VSIX-installed extensions remain visible.
5048
let SkipBuiltins = matches!(std::env::var("LAND_SKIP_BUILTIN_EXTENSIONS").as_deref(), Ok("1") | Ok("true"))
5149
|| matches!(std::env::var("LAND_DISABLE_BUILTIN_EXTENSIONS").as_deref(), Ok("1") | Ok("true"));
5250

@@ -60,10 +58,9 @@ pub fn ScanPathConfigure(AppState:&std::sync::Arc<ApplicationState>) -> Result<V
6058
dev_log!("extensions", "[Extensions] [ScanPaths] Adding default scan paths...");
6159
}
6260

63-
// Atom U1: `LAND_BUILTIN_EXTENSIONS_DIR` (from `.env.Land.Extensions`)
64-
// takes precedence over the executable-relative probing chain. Useful for
65-
// CI builds where the bundle layout differs from both the Tauri `.app`
66-
// convention and the repo layout.
61+
// `LAND_BUILTIN_EXTENSIONS_DIR` takes precedence over the executable-
62+
// relative probing chain. Useful for CI builds where the bundle layout
63+
// differs from both the `.app` convention and the repo layout.
6764
if !SkipBuiltins {
6865
if let Ok(Override) = std::env::var("LAND_BUILTIN_EXTENSIONS_DIR") {
6966
let OverridePath = ExpandUserPath(&Override);

Source/ProcessManagement/NodeResolver.rs

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
#![allow(non_snake_case, dead_code)]
22

3-
//! # Node Binary Resolver
3+
//! Resolves the Node.js binary used to spawn Cocoon.
44
//!
5-
//! Resolves the Node.js binary used to spawn the Cocoon sidecar. Checks, in
6-
//! order:
5+
//! Ladder (first hit wins, cached in `OnceLock`):
6+
//! `LAND_NODE_BINARY` override → shipped (`Resources/Node/bin/node`) →
7+
//! fnm → volta → asdf → nvm → homebrew → PATH `node`.
78
//!
8-
//! 1. **Explicit override** - `LAND_NODE_BINARY` env var. Operators set this
9-
//! to pin to a specific Node install for reproducibility.
10-
//! 2. **Shipped runtime** - `Resources/Node/bin/node` relative to the Tauri
11-
//! bundle (production) or `Target/<profile>/../Node/bin/node` relative to
12-
//! the executable (dev). Ships alongside Mountain for hermetic builds.
13-
//! 3. **Version managers** - fnm, volta, asdf, nvm in their canonical
14-
//! locations. Preferred over system PATH because the user's selected
15-
//! version tracks their workspace (`.nvmrc`, `.tool-versions`).
16-
//! 4. **Package managers** - Homebrew on macOS/Linux, the most common way
17-
//! Node gets installed on developer machines.
18-
//! 5. **PATH fallback** - `which node`. Last resort - works, but version is
19-
//! whatever happens to be first in PATH.
20-
//!
21-
//! Every attempt is logged with its source so a log tells you exactly which
22-
//! Node Mountain picked and why. Resolution happens once at Cocoon spawn
23-
//! time; cached for the life of the Mountain process.
9+
//! Each step logs its outcome so the resolved source is visible in the log.
2410
2511
use std::{
2612
path::{Path, PathBuf},

0 commit comments

Comments
 (0)