-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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-126187 Add emscripten.py script to automate emscripten build #126190
Conversation
@freakboy3742 can you add yourself to |
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.
Just tested this locally and it WFM [tm].
We should probably also update the instructions in Tools/wasm/README.md
, which still point to the old script for building with emscripten.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Done in #126210. |
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.
The script itself looks great; a couple of minor formatting things that are likely the result of automated tooling.
As noted in another review, this needs at least some documentation for how to use it. The Tools/wasm/README.md
contains a big section that would now seem to be largely redundant; so I'm inclined to suggest making that cleanup (or, at least, starting that cleanup) part of this PR.
The other question (which is a "how can we make @brettcannon's life easier" question). Do we want to - or even, can we - migrate the Emscripten-specific stuff into the Tools/wasm/emscripten
folder? AIUI, the complicating factor here is that there is enough WASI tooling that is dependent on the Tools/wasm
location, so moving that stuff to Tools/wasm/wasi
isn't an option - so maybe a depth-based reorg isn't possible and keeping everything in Tools/wasm
is fine. Any thoughts, @brettcannon?
I believe we can. My thought was to put |
51de036
to
ae6f85b
Compare
I've been thinking about it and if we are okay leaving Does that sound like a reasonable plan? |
So in that case, I should put all new Emscripten files including this one under the If there's a |
Whether the entry point is spelled My primary concern is getting separation between WASI- and Emscripten-specific code so that we can have confidence that a change to one target isn't going to impact the other (and, from a basic operational perspective, that CODEOWNERS notifications are accurately addressed). |
...and realising that I didn't actually answer the specific question - yes, I would argue for putting this script into an emscripten subfolder. |
Nope, I expect |
This is modeled heavily on `Tools/wasm/wasi.py`. I tested it manually, hopefully we can soon use it as the basis for an Emscripten build bot. There are a few hacks to work around problems. I prioritized adding a script that works as soon as possible without changing other files over making it non-hacky. I will clean it up in followup.
0dbbaf6
to
7eec30d
Compare
I updated the readme to reflect the changes. There's more readme updates I want to make but it's enough mixed up with changes I've left to future PRs that I think it's better to include with that later work. |
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.
Thanks for the README changes. I see that this also closes #126201 now, which is great.
Thanks for the grammar fixes @mdboom. |
Co-authored-by: Michael Droettboom <[email protected]>
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.
One Q about the docs, and one bug caused by the directory change.
Tools/wasm/README.md
Outdated
```shell | ||
git clone https://github.com/emscripten-core/emsdk.git --depth 1 | ||
./emsdk/emsdk install 3.1.68 | ||
./emsdk/emsdk activate 3.1.68 |
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.
Any reason to nominate 3.1.68 specifically, rather than latest
? I'm a little wary of putting a "magic number" into documentation unless that number is a minimum (like 3.1.42 above) or a pinned version of some significance.
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.
Okay, I'll put latest
for now and when we add actual CI I'll switch it to the specific version used in CI.
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.
Out of interest - how stable/backwards compatible is "latest"? Is the emscripten version analogous to the manylinux tag/macOS dev version for compatibility purposes? Or is this a situation where we'll pick a specific emscripten version for all versions of a Python release (i.e., all 3.14.x releases are Emscripten 3.1.68)?
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.
If we care about abi compatibility the safe way to go is to fix a version.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Okay I have made the requested changes; please review again. Thanks for the review @freakboy3742. |
Thanks for making the requested changes! @freakboy3742, @mdboom: please review the changes made to this pull request. |
Huh interesting that the bot rerequested review from @mdboom even though his review status was already approved. |
This is modeled heavily on
Tools/wasm/wasi.py
. I tested it manually, hopefully we can soon use it as the basis for an Emscripten build bot.There are a few hacks to work around problems. I prioritized adding a script that works as soon as possible without changing other files over making it non-hacky. I will clean it up in followup.
cc @freakboy3742.