Skip to content
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

fix: update usage of env related things #17

Merged
merged 2 commits into from
Aug 31, 2022
Merged

fix: update usage of env related things #17

merged 2 commits into from
Aug 31, 2022

Conversation

ckipp01
Copy link
Owner

@ckipp01 ckipp01 commented Aug 31, 2022

  • fix: don't use System.getenv
  • docs: add another thing to the faq section

You can find some more info about this in:
https://com-lihaoyi.github.io/mill/mill/Task_Context_API.html#_mill_api_ctx_env

Taken from there:

> Mill keeps a long-lived JVM server to avoid paying the cost of recurrent classloading. Because of this, running System.getenv in a task might not yield up to date environment variables, since it will be initialised when the server starts, rather than when the client executes. To circumvent this, mill’s client sends the environment variables to the server as it sees them, and the server makes them available as a Map[String, String] via the Ctx API.
@ckipp01 ckipp01 changed the title env fix: update usage of env related things Aug 31, 2022
@ckipp01 ckipp01 merged commit 79e2ed0 into main Aug 31, 2022
@ckipp01 ckipp01 deleted the env branch August 31, 2022 07:55
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