Skip to content

Simplify env var config lookups#1382

Open
sirosen wants to merge 1 commit intoglobus:mainfrom
sirosen:improve-env-var-loading
Open

Simplify env var config lookups#1382
sirosen wants to merge 1 commit intoglobus:mainfrom
sirosen:improve-env-var-loading

Conversation

@sirosen
Copy link
Copy Markdown
Member

@sirosen sirosen commented May 1, 2026

Our env var loading code has not aged well with the advent of type checking -- it is very dynamically typed, and attempting to annotate it precisely is overly complex. Even with type overloads, the resulting helper is not properly typed in all cases, and cannot extend to new callback types gracefully.

Simplify env var loading to follow some common patterns without using complex helpers.

No behaviors were intentionally changed, although a TODO note was added to an odd decision to convert "" to a default in one case.

Our env var loading code has not aged well with the advent of type
checking -- it is very dynamically typed, and attempting to annotate it
precisely is overly complex. Even with type overloads, the resulting
helper is not properly typed in all cases, and cannot extend to new
callback types gracefully.

Simplify env var loading to follow some common patterns without using
complex helpers.

No behaviors were intentionally changed, although a TODO note was added
to an odd decision to convert `""` to a default in one case.
@sirosen sirosen force-pushed the improve-env-var-loading branch from 7062fb3 to dcfa162 Compare May 1, 2026 21:52
@sirosen sirosen added the no-news-is-good-news This change does not require a news file label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-news-is-good-news This change does not require a news file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant