-
Notifications
You must be signed in to change notification settings - Fork 48.8k
[compiler][be] Clean up compilation skipping logic in Program #30642
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
Conversation
[ghstack-poisoned]
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
return; | ||
} | ||
|
||
const environment = parseEnvironmentConfig(pass.opts.environment ?? {}); | ||
/* | ||
* TODO(lauren): Remove pass.opts.environment nullcheck once PluginOptions |
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.
Previously, we waited until compiling a function to validate environment configs. Let's just do this unconditionally -- this should be a fatal error and hopefully never happens in prod
@@ -514,43 +486,29 @@ export function compileProgram( | |||
externalFunctions.push(gating); | |||
} | |||
|
|||
const lowerContextAccess = pass.opts.environment?.lowerContextAccess; | |||
const lowerContextAccess = environment.lowerContextAccess; |
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.
Now we're able to rely on the parsed / validated EnvironmentConfig, which comes with default values (instead of using a PartialEnvironmentConfig
and duplicating defaults
…ram" --- Drive-by cleanup when writing #30643 [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
Drive-by cleanup when writing #30643