Skip to content

1.8.0 and LSP stabilization plan

Status: Complete across all three tracks (adotenv-lsp 0.6.0, adotenv / adotenv-process / adotenv-cli 1.8.0, and adotenv-lint 0.3.0). Tracking issues: #248 (adotenv-lsp 0.6.0 stabilization, closed), #249 (adotenv 1.8.0 additive core APIs, closed), #250 (remaining After-1.0 edge cases, closed), and #251 (adotenv-lint 0.3.0, closed).

This cycle has three coordinated tracks:

  1. Graduate adotenv-lsp out of unstable prototype status into a semver-checked 0.6.x line.
  2. Ship additive 1.8.0 lockstep capabilities in adotenv, adotenv-process and adotenv-cli while keeping the core no_std, dependency-free, Rust 1.81 compatible and semver-compatible with 1.x.
  3. Follow up with adotenv-lint 0.3.0 on top of adotenv 1.8.0 for schema rules and bounded fix application.

Track 1: adotenv-lsp 0.6.0 stabilization (#248)

Section titled “Track 1: adotenv-lsp 0.6.0 stabilization (#248)”

adotenv-lsp stays on its own 0.x line (starting with 0.6.0 as the first semver-checked release) rather than jumping to 1.0.0. Its public library API exposes lsp-types 0.x directly, so following the same rule used by adotenv-config and adotenv-figment, an upstream lsp-types minor bump remains a 0.x minor release of adotenv-lsp instead of causing major-version churn.

Non-breaking groundwork landed ahead of 0.6.0

Section titled “Non-breaking groundwork landed ahead of 0.6.0”
  • Monotonic position mapping when a diagnostic span lands between \r and \n of a CRLF line ending (such as an unknown escape "\\\r\n"), plus full UTF-16 surrogate-pair width when anchoring stripped BOM diagnostics.
  • Accurate BomPolicy::Error column mapping and zero-width BOM diagnostics on BOM-only or BOM+newline inputs.
  • Recovering parse in rename_with_options (preserving parse-limit errors while allowing renames in files with unrelated syntax errors) and single-entry narrowing in reference_at.
  • Multiline, backtick, Compose colon, Python escaped-single-quote, raw-value, escaped-dollar and braced dotted-reference fixes in completion, plus multiline key escaping in Markdown hover output.
  • LSP 3.17 protocol compliance in the stdio binary: serverInfo in initialize, document version in textDocument/publishDiagnostics, non-zero exit when exit arrives before shutdown, rejection of didChange on unopened URIs, explicit transport-error propagation, scheme-aware and Windows drive-letter URI ignore matching, and CLI --dialect, --max-items and --max-diagnostics flags.
  • Additive library polish: EditError and BomPolicy re-exports, LspOptions::without_lint_options, Clone/PartialEq/Eq on RenameError, and runnable crate and README doctests.

Freeze criteria for 0.6.0 (published 2026-11-27)

Section titled “Freeze criteria for 0.6.0 (published 2026-11-27)”
  1. Public API symmetry and session handle: unified all 12 stateless free functions to take &LspOptions consistently (removing the seven _with_options duplicates) and exposed stateful ParsedDocument and Session handles so both library embedders and the stdio binary parse and line-index each document once per open/change.
  2. Protocol semantics decisions: adopted LSP 3.17 §3.1.1 column clamping (character > line_len clamps to line end while out-of-bounds lines, inverted ranges, split UTF-16 surrogates and mid-character UTF-8 bytes return None), and narrowed references locations to reference.name identifier spans (matching definition, prepareRename and rename).
  3. Bounded transport and dependency hygiene:
    • Replaced lsp-server with a synchronous, zero-unsafe, bounded JSON-RPC 2.0 Content-Length stdio transport (8 KiB header-line cap, 32 header cap, 16 MiB default payload cap configurable via --max-message-bytes) that rejects oversized frames before allocating payload buffers.
    • Gated the stdio binary behind the default-on stdio feature ([[bin]] name = "adotenv-lsp" required-features = ["stdio"]) with optional serde/serde_json dependencies so library embedders using default-features = false build only the transport-free library.
    • Relaxed lsp-types = "0.97", bumped dependency floors to adotenv 1.7.3 and adotenv-lint 0.2.3, and lowered adotenv-lsp MSRV to Rust 1.81 (matching adotenv after removing edition-2024 lsp-server).
  4. Editor capabilities: added textDocument/prepareRename, textDocument/formatting (Document::format), textDocument/codeAction (adotenv-lint quick fixes and BOM-preserving source.fixAll), LSP 3.17 positionEncoding negotiation (utf-16, utf-8, utf-32), and workspace-folder (workspaceFolders -> rootUri -> cwd) discovery for --discover-lint-config.
  5. CI and documentation graduation: bumped adotenv-lsp to 0.6.0, added --package adotenv-lsp to cargo semver-checks check-release in CI, folded adotenv-lsp (default and --no-default-features) into the required Rust 1.81 MSRV check, documented why minimal-versions still excludes adotenv-lsp (lsp-types 0.97’s 2018-era minimums), and removed prototype caveats across the README, Language server, Quality, Feature decisions, Architecture, RELEASING.md and ROADMAP.md.

Track 2: adotenv 1.8.0 lockstep additions (#249, #250)

Section titled “Track 2: adotenv 1.8.0 lockstep additions (#249, #250)”

All core additions stay additive and preserve 1.x semver compatibility, no_std builds and the Rust 1.81 MSRV:

  1. CompactEntries loaders and process helpers (#249, landed):
    • Added load_cascade_entries_compact, load_cascade_entries_compact_with, load_cascade_entries_compact_with_options, load_entries_compact and load_entries_compact_with_options under the load feature, using value-preserving cascade merge while keeping bare declarations.
    • Added adotenv-process::{validate_compact_entries, apply_compact_entries} skipping bare None entries and validating/setting assigned entries.
  2. Bounded edit, format and sort helpers (#249, landed):
    • Added Document::{comment,uncomment,set_export}_with_options accepting EditOptions, plus EditOptions::max_references / LimitKind::References for bounded reference scanning in rename_with_references_with_options and sort_with_options.
    • Added Document::format_with_options(&FormatOptions, EditOptions) and Document::sort_with_options(EditOptions) returning EditError with pre-allocation byte and line caps and bounded verification/reference scanning (closing the AUD-9 caveat in 1.1 audit).
  3. Multi-BOM support on LineIndex and CLI wiring (#249, landed):
    • Added LineIndex::with_bom_policy(BomPolicy) supporting BomPolicy::Strip, BomPolicy::StripAll, BomPolicy::Keep and BomPolicy::Error.
    • Wired adotenv-cli to LineIndex::with_bom_policy in check, CompactValues in get/load/run, global --max-items / --max-diagnostics, and bounded fmt (sort_with_options and format_with_options with --max-output-bytes, --max-output-lines and --max-references), and bumped adotenv, adotenv-process and adotenv-cli in lockstep to 1.8.0 (published 2026-11-28). Independent companion crates (adotenv-lint, adotenv-lsp) adopt adotenv 1.8.0 in their own follow-up releases.
  4. Remaining After-1.0 edge cases (#250, landed):
    • Fixed formatting idempotence under LineBreaks::Lf (with and without custom line_byte_limit) when quote normalization interacts with trailing whitespace trimming or FinalNewline::Remove, preserved native \u{feff} keys in QuotedTail::Append encoding, and added Python \u{feff}export and capped LF-only regression/fuzz coverage (see 1.0 fix round).
    • Parsed non-string scalar Serde map keys (BTreeMap<u16, String>, bool, char, integers, floats, newtypes, bytes, Option) with the same rules as values, and documented the #[serde(deserialize_with = ...)] pattern for typed non-string fields inside #[serde(flatten)] (preserving flattened String fields and BTreeMap<String, String> compatibility).
    • Updated Document::example to emit bare text following a Compose closing quote on the same physical line as a # comment while preserving explicit second assigned declarations.

Track 3: adotenv-lint 0.3.0 follow-up (#251, landed)

Section titled “Track 3: adotenv-lint 0.3.0 follow-up (#251, landed)”
  • Added opt-in schema and .env.example presence-and-shape rules (Rule::{MissingKey,UnknownKey,EmptyValue,InvalidValue}, Schema, KeySchema, ValueShape, lint_with_schema, [schema] TOML config, --example, --no-unknown-keys, --no-empty-values), keeping parser core policy-free (see Feature decisions).
  • Wired lint_with_options, apply_fix_with_options, apply_fixes_with_options, apply_batch_with_options (with two-pass QuoteStyle::Unquoted convergence), adotenv-lint CLI limit flags, and adotenv-lsp formatting/code-actions to adotenv 1.8.0’s bounded edit_with_options, format_with_options, and sort_with_options.

Completed for adotenv-lsp 0.6.0, v1.8.0, and adotenv-lint 0.3.0:

  1. Pass all CI jobs (fmt, clippy, docs, supply chain, public API semver including adotenv-lsp, cross-platform tests, MSRV 1.81 / 1.88, minimal versions, package, benchmark smoke, deterministic perf, alloc-only core, conformance and Docs headless-browser smoke).
  2. Run focused --in-diff mutation sweeps on the dedicated remote validation host (one worker, 8 GiB cap; see Heavy validation) and close all genuine test gaps.
  3. Run four clean seven-target fuzz.yml workflow runs on the release commit when core parser, edit, format, encoding or limit code changes.
  4. Record clean-SHA memory and speed benchmark matrices on the reference host through its single-slot serialized queue and publish RESULTS-1.8.0.md.
  5. Verify crates.io, docs.rs, GitHub Release SHA-256 checksums and Sigstore build-provenance attestations for every published crate.