-
Notifications
You must be signed in to change notification settings - Fork 49.7k
[compiler][playground] (4/N) Config override panel #34436
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
[compiler][playground] (4/N) Config override panel #34436
Conversation
|
Hey @mofeiZ, any guidance on what to do for the default config overrides? Should I just leave it empty? |
| // Parse config overrides from config editor | ||
| let configOverrideOptions: any = {}; | ||
| const configMatch = configOverrides.match(/^\s*import.*?\n\n\((.*)\)/s); | ||
| // TODO: initialize store with URL params, not empty store | ||
| if (configOverrides.trim()) { | ||
| if (configMatch && configMatch[1]) { | ||
| const configString = configMatch[1].replace(/satisfies.*$/, '').trim(); | ||
| configOverrideOptions = new Function(`return (${configString})`)(); | ||
| } else { | ||
| throw new Error('Invalid config overrides'); | ||
| } | ||
| } |
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.
super nit: you can refactor this to a separate function to keep compile clean
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.
looks great!
| enableReanimatedCheck: true, | ||
| customOptOutDirectives: null, | ||
| target: '19', | ||
| panicThreshold: 'all_errors', |
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.
Let's figure out the panicThreshold override in a followup.
irrc we're currently using panicThreshold: 'none' along with a separate linting pass (to record warning diagnostics)
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.
Actually, I'll just remove panicThreshold for now then
Summary
Removed the old
OVERRIDEpragma to make the source of truth for config overrides in the left-hand pane. Now, it will automatically update the output pane each time there is an edit to the config. The old pragma format is still supported, but it will be overwritten by the config pane if they are modifying the same flags. Removed the gating on the config panel so now all users will automatically be able to view it, but it will be initially collapsed.How did you test this change?
Screen.Recording.2025-09-09.at.3.50.19.PM.mov