Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature decisions

Feature decisions use these rules:

  • Keep parsing literal and free of implicit I/O.
  • Keep the core free of required runtime dependencies.
  • Preserve the MSRV and no_std build.
  • Prefer a separate crate when a feature needs a protocol, crypto, editor integration or opinionated policy.
  • Adopt compatibility behavior only when a pinned upstream oracle exists.

Decisions

AreaDecisionReason
Values-only parsingAdoptAdded parse_values and parse_values_with; no document metadata is retained.
Linter rules and fixesIncubate as a companion cratedotenv-linter has 14 opinionated checks. Lint policy does not belong in the parser core.
LSP and editor supportIncubate as a companion crateadotenv already has spans, diagnostics and edits. An LSP needs editor protocol work, not parser changes.
Encryption and vault filesReject for the coreCrypto, key handling and secret distribution are a different product. Keep adotenv usable as a literal parser.
Implicit file searchRejectLoading is explicit by directory, mode or ordered file list. Hidden search changes behavior by working directory.
Environment inheritanceRejectBare keys stay bare. Callers provide lookup values explicitly.
Ambient command executionRejectCommands stay literal unless a caller supplies a callback or uses the opt-in exec helper.
Process mutationKeep in adotenv-processThe core stays safe. Process mutation remains isolated and unsafe by design.
CLI process executionKeep in adotenv-cli runThe CLI starts a child without mutating the parent environment.
More syntax presetsConditionalAdd a preset only with a pinned source, package identity and reproducible observations.
Streaming parserDeferparse_values covers the low-memory map path. Streaming needs a separate grammar and error model decision.
More adaptersConditionalAdd an adapter when it can consume documents or loaded environments without changing core policy.

Linter companion

dotenv-linter demonstrates demand for checks such as duplicate keys, unordered keys, lowercase keys, quote style, whitespace, leading characters and schema rules. adotenv should not add those policies to the parser.

A future adotenv-lint crate can use the existing document model and return structured findings and verified edits. It should not require changes to core parsing.

LSP companion

Editor demand is visible in ecolog-lsp, which provides completion, definition, hover, references, rename, diagnostics and value masking across many languages.

A future adotenv-lsp crate can reuse Document spans and VerifiedEdits. It should keep value masking opt-in and avoid ambient environment lookup by default.

Syntax presets

New presets must include:

  • a pinned implementation version and source identity;
  • a reproducible oracle adapter;
  • input and profile hashes;
  • a clear statement of which behavior is literal and which requires loading or interpolation support.

Presets without a stable oracle remain rejected.

Streaming

A streaming API would need to preserve source spans and recovery behavior, or explicitly define a reduced stream mode. This is deferred until a real user needs bounded-memory streaming beyond parse_values and the values-only loaders.