Skip to content
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

WorkerdAPI: Factor out Python module setup from compileModules #2043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Contributor

We've added ~100 lines of Python-only logic to compileModules which is otherwise only ~30 lines long. I moved it into a separate function.

We've added ~100 lines of Python-only logic to compileModules which is otherwise
only ~30 lines long. I moved it into a separate function.
Comment on lines +395 to +396
void
setupPythonModules(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void
setupPythonModules(
void setupPythonModules(

config::Worker::Reader conf,
const PythonConfig& pythonConfig,
CompatibilityFlags::Reader featureFlags
) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This also doesn't match kj code style

) {
using namespace workerd::api::pyodide;
auto confModules = conf.getModules();
auto modules = jsg::ModuleRegistryImpl<JsgWorkerdIsolate_TypeWrapper>::from(lockParam);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto modules = jsg::ModuleRegistryImpl<JsgWorkerdIsolate_TypeWrapper>::from(lockParam);
auto modules = jsg::ModuleRegistryImpl<JsgWorkerdIsolate_TypeWrapper>::from(lockParam);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants