Skip to content

Commit efff804

Browse files
committed
Merge branch 'main' into anonymous-file-descriptors
2 parents 7593dc1 + f66b5d7 commit efff804

File tree

180 files changed

+1157
-1371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+1157
-1371
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ jobs:
425425
- checkout
426426
- pip-install
427427
- run: ruff check
428+
# TODO (cclauss): When ruff supports rule E303 without --preview, remove following line
429+
- run: ruff check --preview --select=E303
428430
mypy:
429431
executor: bionic
430432
steps:

.github/workflows/archive.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
create:
5+
tags:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
archive:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
19+
- name: make dist
20+
run: |
21+
make dist
22+
version=`cat emscripten-version.txt | sed s/\"//g`
23+
echo "VERSION=$version" >> $GITHUB_ENV
24+
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
25+
with:
26+
name: emscripten-${{ env.VERSION }}
27+
path: emscripten-${{ env.VERSION }}.tar.bz2
28+
29+
check-expectations:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout repo
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0 # We want access to other branches, specifically `main`
36+
- name: pip install
37+
run: |
38+
which python3
39+
python3 --version
40+
python3 -m pip install -r requirements-dev.txt
41+
- name: Install emsdk
42+
run: |
43+
EM_CONFIG=$HOME/emsdk/.emscripten
44+
echo $EM_CONFIG
45+
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
46+
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
47+
tar -C ~ -xf ~/emsdk-main.tar.gz
48+
mv ~/emsdk-main ~/emsdk
49+
cd ~/emsdk
50+
./emsdk install tot
51+
./emsdk activate tot
52+
echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG
53+
echo "final config:"
54+
cat $EM_CONFIG
55+
- name: Check test expectations on main
56+
run: |
57+
git checkout origin/main
58+
# Hack to honor changes to rebaseline_tests.py in the current PR
59+
git checkout - ./tools/maint/rebaseline_tests.py
60+
./bootstrap
61+
if ! ./tools/maint/rebaseline_tests.py --check-only; then
62+
echo "Test expectations are out-of-date on the main branch."
63+
echo "You can run `./tools/maint/rebaseline_tests.py --new-branch`"
64+
echo "and use it to create a seperate PR."
65+
exit 1
66+
fi

.github/workflows/tag-release.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,44 @@ on:
99
type: string
1010

1111
jobs:
12-
create-release:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout repo
16-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17-
# Updates changelog and writes the release version into the environment
18-
- name: Update Changelog
19-
run: python3 tools/maint/create_release.py --action
20-
- name: Create Changelog PR
21-
id: cpr
22-
uses: peter-evans/create-pull-request@v6
23-
with:
24-
token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
25-
title: Mark ${{ env.RELEASE_VERSION }} as released
26-
team-reviewers: release-reviewers
27-
delete-branch: true
28-
- name: Enable auto-merge
29-
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
30-
env:
31-
GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
32-
- name: Tag release sha
33-
uses: actions/github-script@v7
34-
with:
35-
github-token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
36-
script: |
37-
const tag_sha = '${{ inputs.release-sha }}';
38-
const release_version = '${{ env.RELEASE_VERSION }}';
39-
console.log(`Version ${release_version} at SHA ${tag_sha}`);
40-
const regex = /^[0-9]+.[0-9]+.[0-9]+$/;
41-
const match = release_version.match(regex);
42-
if (!match) {
43-
throw new Error('Malformed release version');
44-
}
45-
await github.rest.git.createRef({
46-
owner: context.repo.owner,
47-
repo: context.repo.repo,
48-
ref: `refs/tags/${release_version}`,
49-
sha: tag_sha
50-
});
12+
create-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17+
# Updates changelog and writes the release version into the environment
18+
- name: Update Changelog
19+
run: python3 tools/maint/create_release.py --action
20+
- name: Create Changelog PR
21+
id: cpr
22+
uses: peter-evans/create-pull-request@v6
23+
with:
24+
token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
25+
title: Mark ${{ env.RELEASE_VERSION }} as released
26+
body: Update changelog and emscripten-version.txt [ci skip]
27+
team-reviewers: release-reviewers
28+
delete-branch: true
29+
- name: Enable auto-merge
30+
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
31+
env:
32+
GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
33+
- name: Tag release sha
34+
uses: actions/github-script@v7
35+
with:
36+
github-token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
37+
script: |
38+
const tag_sha = '${{ inputs.release-sha }}';
39+
const release_version = '${{ env.RELEASE_VERSION }}';
40+
console.log(`Version ${release_version} at SHA ${tag_sha}`);
41+
const regex = /^[0-9]+.[0-9]+.[0-9]+$/;
42+
const match = release_version.match(regex);
43+
if (!match) {
44+
throw new Error('Malformed release version');
45+
}
46+
await github.rest.git.createRef({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
ref: `refs/tags/${release_version}`,
50+
sha: tag_sha
51+
});
52+

ChangeLog.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,30 @@ to browse the changes between the tags.
1818

1919
See docs/process.md for more on how version tagging works.
2020

21-
3.1.74 (in development)
21+
3.1.75 (in development)
2222
-----------------------
23+
- `PATH.basename()` no longer calls `PATH.normalize()`, so that
24+
`PATH.basename("a/.")` returns `"."` instead of `"a"` and
25+
`PATH.basename("a/b/..")` returns `".."` instead of `"a"`. This is in line with
26+
the behaviour of both node and coreutils, and is already the case when using
27+
NODERAWFS". (#23180)
28+
29+
3.1.74 - 12/14/24
30+
-----------------
2331
- The file system was updated to independently track atime, mtime and ctime
2432
instead of using the same time for all three. (#22998)
25-
- The minimum supported chrome version was bumped from 32 to 33. (#23077)
2633
- Emscripten-generated code will now use async/await internally when loading
2734
the Wasm module. This will be lowered away by babel when targeting older
2835
browsers. (#23068)
2936
- Due to the discontinued support for invalid specializations of
30-
- `std::basic_string` (https://github.com/llvm/llvm-project/pull/72694), the
37+
`std::basic_string` (https://github.com/llvm/llvm-project/pull/72694), the
3138
support for `std::basic_string<unsigned char>` was removed from embind.
3239
(#23070)
40+
- The minimum supported versions of browser engines that we support were updated
41+
to versions that support Promise, Fetch and Object.asign APIs, allowing the
42+
polyfills for these to be removed. Chrome 32 -> 45, Firefox 34 -> 40, Safari
43+
9.0 -> 10.1. These browser engines version are all over 8 years old now.
44+
(#23077, #23118)
3345

3446
3.1.73 - 11/28/24
3547
-----------------

docs/emcc.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Options that are modified or new in *emcc* are listed below:
252252
"--closure 0|1|2"
253253
[link] Runs the *Closure Compiler*. Possible values are:
254254

255-
* "0": No closure compiler (default in "-O2" and below).
255+
* "0": No closure compiler (default).
256256

257257
* "1": Run closure compiler. This greatly reduces the size of
258258
the support JavaScript code (everything but the WebAssembly or
@@ -277,9 +277,6 @@ Options that are modified or new in *emcc* are listed below:
277277
before the closure-compiled code runs, because then it will
278278
reuse that variable.
279279

280-
* Closure is only run if JavaScript opts are being done ("-O2" or
281-
above).
282-
283280
"--closure-args=<args>"
284281
[link] Pass arguments to the *Closure compiler*. This is an
285282
alternative to "EMCC_CLOSURE_ARGS".

emcc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,13 @@ def consume_arg_file():
12681268
if is_int(requested_level):
12691269
# the -gX value is the debug level (-g1, -g2, etc.)
12701270
settings.DEBUG_LEVEL = validate_arg_level(requested_level, 4, 'invalid debug level: ' + arg)
1271+
if settings.DEBUG_LEVEL == 0:
1272+
# Set these explicitly so -g0 overrides previous -g on the cmdline
1273+
settings.GENERATE_DWARF = 0
1274+
settings.GENERATE_SOURCE_MAP = 0
1275+
settings.EMIT_NAME_SECTION = 0
1276+
elif settings.DEBUG_LEVEL > 1:
1277+
settings.EMIT_NAME_SECTION = 1
12711278
# if we don't need to preserve LLVM debug info, do not keep this flag
12721279
# for clang
12731280
if settings.DEBUG_LEVEL < 3:
@@ -1298,17 +1305,20 @@ def consume_arg_file():
12981305
settings.GENERATE_DWARF = 1
12991306
elif requested_level == 'source-map':
13001307
settings.GENERATE_SOURCE_MAP = 1
1308+
settings.EMIT_NAME_SECTION = 1
13011309
newargs[i] = '-g'
13021310
else:
13031311
# Other non-integer levels (e.g. -gline-tables-only or -gdwarf-5) are
13041312
# usually clang flags that emit DWARF. So we pass them through to
13051313
# clang and make the emscripten code treat it like any other DWARF.
13061314
settings.GENERATE_DWARF = 1
1315+
settings.EMIT_NAME_SECTION = 1
13071316
# In all cases set the emscripten debug level to 3 so that we do not
13081317
# strip during link (during compile, this does not make a difference).
13091318
settings.DEBUG_LEVEL = 3
13101319
elif check_flag('-profiling') or check_flag('--profiling'):
13111320
settings.DEBUG_LEVEL = max(settings.DEBUG_LEVEL, 2)
1321+
settings.EMIT_NAME_SECTION = 1
13121322
elif check_flag('-profiling-funcs') or check_flag('--profiling-funcs'):
13131323
settings.EMIT_NAME_SECTION = 1
13141324
elif newargs[i] == '--tracing' or newargs[i] == '--memoryprofiler':

emscripten-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.74-git
1+
3.1.75-git

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,8 @@ lint.ignore = [
4949
"PLW1510",
5050
"PLW2901",
5151
]
52-
5352
lint.per-file-ignores."emrun.py" = [ "PLE0704" ]
54-
5553
lint.mccabe.max-complexity = 48 # Recommended: 10
56-
5754
lint.pylint.allow-magic-value-types = [
5855
"bytes",
5956
"float",

0 commit comments

Comments
 (0)