-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Allow setting of CLOSURE_ARGS in ports #24192
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
base: main
Are you sure you want to change the base?
Conversation
This is the only test that fails. It doesn't seem to be related to my changes but please let me know if it is.
|
def test_closure_args_from_port(self): | ||
port = test_file('test_closure_args_port.py') | ||
self.run_process([EMCC, test_file('hello_world.c'), | ||
f'--use-port={port}', |
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.
Does ,...,'--port', test_file('test_closure_args_port.py') ..
work here
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.
Absolutely. The only purpose of this port is to set the closure args (and obviously test the feature in the process). If this line is commented out the test fails because the closure args are not set on the command line.
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.
What I mean is can you avoid the port
variable here and do:
self.run_process([EMCC, test_file('hello_world.c'), '--use-port', test_file('test_closure_args_port.py'), ...
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.
i.e. no need for the f-string
The |
This is the implementation that was discussed in #24109
I can update the Changelog in a later commit if the tests pass in CI and this PR is approved.
other.test_closure_externs
to make sure that the changes were not affecting existing codeother.test_closure_args_from_port
that piggy back ontest_closure_externs
to pass the same parameter in the port instead and make sure that these changes actually do what they are supposed to do in the first place.Hopefully I didn't forget anything. The changes are pretty straightforward in the grand scheme of things.