Skip to content

Use prelaunch context instead of reading app env. variable #10018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dumbbell
Copy link
Collaborator

@dumbbell dumbbell commented Dec 1, 2023

Why

We use the application environment as some kind of "cache" for the configuration parameters and some system environment variables. However, because we don't use sys.config, the application environment could be reset to its default/empty state if we were to use Erlang releases.

How

For values that may come from the system environment, we use the prelaunch context instead.

@dumbbell dumbbell added this to the 3.13.0 milestone Dec 1, 2023
@dumbbell dumbbell self-assigned this Dec 1, 2023
@dumbbell dumbbell force-pushed the use-context-instead-of-application-env branch 2 times, most recently from 7719665 to 9a54ad3 Compare December 4, 2023 13:29
[Why]
We use the application environment as some kind of "cache" for the
configuration parameters and some system environment variables. However,
because we don't use `sys.config`, the application environment could be
reset to its default/empty state if we were to use Erlang releases.

[How]
For values that may come from the system environment, we use the
prelaunch context instead.

V2: If the value is unavailable from the context, we fall back to the
    application environment variable. We still need this for the CLI and
    some testsuites.
... instead of reading an application environment variable directly.

[Why]
There an API to abrastract already, let's use it.
@dumbbell dumbbell force-pushed the use-context-instead-of-application-env branch from 9a54ad3 to c10c232 Compare December 8, 2023 14:32
@dumbbell dumbbell removed this from the 3.13.0 milestone Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant