-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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][be] Clean up compilation skipping logic in Program #30642
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]
ghstack-source-id: fe2c81de9d4f41a787c690b722cbcff55eb18ac3 Pull Request resolved: #30642
Stack from ghstack (oldest at bottom):
Drive-by cleanup when writing #30643