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_stdbuild. - 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
Section titled “Decisions”| Area | Decision | Reason |
|---|---|---|
| Values-only parsing | Adopt | Added parse_values, parse_values_compact and parse_entries_compact; no document metadata is retained. |
| Linter rules and fixes | Separate companion crate | Published as adotenv-lint; lint checks are opinionated policy that does not belong in the parser core. |
| LSP and editor support | Separate companion crate | Published as adotenv-lsp; editor protocol work reuses Document spans and edits without changing parser core. |
| Encryption and vault files | Reject for the core | Crypto, key handling and secret distribution are a different product. Keep adotenv usable as a literal parser. |
| Implicit file search | Reject | Loading is explicit by directory, mode or ordered file list. Hidden search changes behavior by working directory. |
| Environment inheritance | Reject | Bare keys stay bare. Callers provide lookup values explicitly. |
| Ambient command execution | Reject | Commands stay literal unless a caller supplies a callback or uses the opt-in exec helper. |
| Process mutation | Keep in adotenv-process |
The core stays safe. Process mutation remains isolated and unsafe by design. |
| CLI process execution | Keep in adotenv-cli run |
The CLI starts a child without mutating the parent environment. |
| More syntax presets | Conditional | Add a preset only with a pinned source, package identity and reproducible observations. |
| Streaming parser | Defer | parse_values covers the low-memory map path. Streaming needs a separate grammar and error model decision. |
| More adapters | Conditional | Add an adapter when it can consume documents or loaded environments without changing core policy. |
Linter companion
Section titled “Linter companion”Useful checks include duplicate keys, unordered keys, lowercase keys, quote style, whitespace, leading characters and schema rules. adotenv should not add those policies to the parser.
The adotenv-lint companion crate uses the existing document model, returns
structured findings and applies verified edits/formats. It does not change
core parsing.
LSP companion
Section titled “LSP companion”An editor integration needs completion, definition, hover, references,
prepareRename, rename, formatting, code actions, diagnostics and value
masking.
adotenv-lsp is a separate semver-checked 0.x companion crate (starting with
0.6.0). It reuses Document spans, formatting and VerifiedEdits, keeps
value masking opt-in, bounds incoming stdio frames before allocation, and does
not read the process environment.
Syntax presets
Section titled “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
Section titled “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, CompactValues,
CompactEntries and the values-only loaders.