Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
gh-126691: Remove --with-emscripten-target #126787
gh-126691: Remove --with-emscripten-target #126787
Changes from 1 commit
434f67f
4516f3e
c11dae9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is there a reason this wasn't needed previously?
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.
With
-sNODERAWFS
, the emulated file system is set up to match the native file system as closely as possible. So this is automatic. Now that we are not doing that, we need to mount the standard library so that the Python interpreter will start up. Ideally we'd be able to select whether or not to use-sNODERAWFS
at runtime, but it's a node only option.I think in a followup I'll update it to mount most of the native file system directories. But I want to change the way a few more things work first (and there are some bugs that make this a bit weirder than it could be emscripten-core/emscripten#22924).
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
For my own edification - the summary of this set of changes is that we can essentially use the node compilation options everywhere:
--preload-file
is not longer required;os.py
replacement in the standard library is no longer required;-sALLOW_MEMORY_GROWTH
,-sNODERAWFS
and-sEXIT_RUNTIME
flags any more-gseparate-dwarf
now presumably works in Chrome Devtools.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.
Yeah:
--preload-file
It is easy to use but it produces files in an ad-hoc file format that Emscripten made. We prefer to use tar or zip files, though it requires a tiny bit more setup. In Node, the plan is to use the NODEFS to mount the standard lib, see above. In the browser, we'll zip the standard library into
python314.zip
and put it in the file system at/lib/python314.zip
then allow it to be imported via the zip importer.os.py
Not really sure what this was for to be honest. Removing it doesn't cause any test failures as far as I can tell?
-sALLOW_MEMORY_GROWTH
It was a mistake to remove this, I think it will cause additional test failures.
-sNODERAWFS
It's incompatible with browsers so we can't use it if we want to share one build for both.
-sEXIT_RUNTIME
Well. I'm not actually sure on this one to be honest:
It seems potentially helpful. I'm not sure what happens if you use
exit_with_live_runtime()
with-sEXIT_RUNTIME
. My main reason for removing was that Pyodide doesn't pass it. But I think it'd be better to put it back for now and see what it does.-gseparate-dwarf
Yes, it works in chrome devtools now. I'm a bit unclear also on why it was used in node before but not in chrome -- when I debug node, I go to
chrome://inspect
and click "Open dedicated DevTools for Node" so... yeah I thought the node debugger is chrome devtools too...