gh-156780: Emscripten: add missing EM_JS_DEPS - #156798
Conversation
|
@hoodmane first PR that add the EM_JS_DEPS() everywhere |
259acbf to
692abd8
Compare
692abd8 to
f770de5
Compare
|
Noting that CI is currently failing because of a duplicated symbol; that seems to suggest there's a need to collate these declarations into a single coherent location so that we can avoid duplication, rather than co-locating them with usage. Also - can I ask that you please don't force push. We don't care about a "messy" commit history; CPython uses merge commits, so any messy history isn't preserved after merge. Force pushes also mean that we can lose the context for review comments, and it's really easy to force push a merge comment that pings the entire core team for comment. |
|
Emscripten's normal style guide is to put these next to the symbol that uses them so I think that's alright. I think we have a conflict with #156335, need to merge a main that includes that commit and fix the duplicate symbol. |
EM_JS bodies are emitted verbatim, so Emscripten cannot see the JS symbols they reference. Declare them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
8015a97 to
18a9541
Compare
|
@freakboy3742 "Noting that CI is currently failing because of a duplicated symbol" ? The build fail no? The issue here is that my fork was not up to date with main. Also about the force push well noted, I had to do it here to properly rebase on latest master |
freakboy3742
left a comment
There was a problem hiding this comment.
Ok - if Emscripten convention is to keep the declarations locally, then it makes sense for us to do the same.
|
* main: (158 commits) pythongh-156924: Try reifying lazy imports in `ForwarRef.evaluate()` (python#156940) pythongh-156233: Fix typos and code snippet errors in the docs (python#156475) pythongh-156837: Refer to yield expressions in generator function definitions (pythonGH-156863) pythongh-155292: Skip updating unicodedata with mismatched interpreter (pythonGH-157066) pythongh-157170: Document the scope of global curses settings (pythonGH-157207) pythongh-155966: Correct handling of `math.tanpi` poles (python#155980) pythongh-157170: Restore use_env() after test_use_prescr_screen in test_curses (pythonGH-157171) pythongh-156910: fix deadlock in type_set_abstractmethods under free-threading (python#156948) pythongh-155648: Write the empty and placeholder IDLE tests (python#156260) pythongh-153569: centralize formatted-string state and source spans (python#156484) pythongh-157137: Mark the PEP 820 soft deprecations as 3.15, not `next` (python#157138) pythongh-152433: Use regular LoadLibrary in UWP for Windows system libs (pythonGH-156972) pythongh-121617: Fix Py_CLEAR() memcpy in C++: replace NULL with _Py_NULL (python#157188) pythongh-157135: Fix documentation errors in the `math.atan{2}pi` functions (python#157136) pythongh-121617: Fix Py_CLEAR() in C++: replace NULL with _Py_NULL (python#157067) pythongh-156774: Speed up pdb startup with asyncio guard (python#156775) pythongh-156109: Allow static, non-framework iOS builds (python#156110) pythongh-156780: Emscripten: add missing EM_JS_DEPS (python#156798) pythongh-152936: Make privileged functions available on Android (python#152977) pythongh-123018: Keep the libedit history file header when truncating (pythonGH-157165) ...
Split out of #156781, as suggested by @hoodmane.
EM_JSbodies are emitted verbatim, so Emscripten's dependency tracker cannot see the JS symbols they reference and silently omits them.Declared here:
$FS,$PATH,$FS_getMode,$resolveGlobalSymbolandemscripten_exit_with_live_runtimeinemscripten_syscalls.c, and$wasmTable,$wasmMemory,$addFunction,$addOnPreRuninemscripten_trampoline.c.No change for
MAIN_MODULEbuilds. Without it, the link now fails withinstead of a
ReferenceErrorduringinitRuntime.