Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36
feat(client): serve getEnv over runner IPC#446
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { getEnv } from '@voidzero-dev/vite-task-client'; | ||
| const value = getEnv('PROBE_ENV') ?? '(unset)'; | ||
| console.log('PROBE_ENV=' + value); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # fetch_env_reads_declared_env | ||
| Exercises `getEnv(name)`: the tool asks the runner for a declared env var and prints the served value. This verifies the round-trip IPC behavior before any runner-reported env is added to the cache fingerprint. | ||
| ## `PROBE_ENV=served vt run fetch-env-declared` | ||
| runner serves PROBE_ENV from the spawned task env map | ||
| ``` | ||
| $ node scripts/fetch_env.mjs | ||
| PROBE_ENV=served | ||
| ``` |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a cached task declares an output-affecting variable under
untrackedEnv,SpawnCommand::all_envsstill contains that value, so this handoff letsgetEnv("FOO")return it even though this commit does not record env reads inReportsor add them to the cache fingerprint. A task can then cache output that depends onFOOand incorrectly hit afterFOOchanges; until tracked reads are implemented, serve only fingerprinted envs or force trackedgetEnvreads to affect/disable caching.Useful? React with 👍 / 👎.