refactor(env): remove the task type update flag - #2315
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7889a4f8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let current = std::fs::read_to_string(&run_config_path) | ||
| .expect("Failed to read run-config.ts") | ||
| .replace('\r', ""); | ||
| pretty_assertions::assert_eq!(current, ts_type, "run-config.ts is out of sync."); |
There was a problem hiding this comment.
Preserve a regeneration path for run-config.ts
When an upstream UserRunConfig change alters TS_TYPE, this test now only reports the mismatch and no repository command can regenerate packages/cli/src/run-config.ts; that file still explicitly says it is auto-generated by cargo test and must not be edited manually. Keep the update mode or replace it with a documented generator so contributors can update the checked-in public TypeScript types instead of being left with a permanently failing test.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
^ This is the correct explanation of VITE_UPDATE_TASK_TYPES's purpose.
| pretty_assertions::assert_eq!( | ||
| current, | ||
| ts_type, | ||
| "run-config.ts is out of sync. Run `VITE_UPDATE_TASK_TYPES=1 cargo test -p vite-plus-cli run_config_types_in_sync` to update." |
There was a problem hiding this comment.
VITE_UPDATE_TASK_TYPES should not be removed. It's supposed to be manually set for this test to update the config.
There was a problem hiding this comment.
Thanks for clarifying. In that case, should we keep the manual update mode and rename the variable to VP_UPDATE_TASK_TYPES instead?
There was a problem hiding this comment.
Yes please keep it. VP_UPDATE_TASK_TYPES LGTM.
There was a problem hiding this comment.
I'll close this PR and update #2312 with an additional commit that renames the variable to VP_UPDATE_TASK_TYPES 🙇♂️
Summary
Removing the repository-unset
VITE_UPDATE_TASK_TYPESflag also removes its unused shared configuration entries.Related: #2206, #2312