Skip to content

Commit 93ca163

Browse files
authored
Mark PROXY_TO_WORKER as "under consideration for removal" (#25442)
See #25440
1 parent 66c7623 commit 93ca163

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

test/test_browser.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def setUpClass(cls):
204204
print()
205205

206206
def proxy_to_worker(self):
207-
self.cflags += ['--proxy-to-worker', '-sGL_TESTING']
207+
self.cflags += ['--proxy-to-worker', '-Wno-deprecated', '-sGL_TESTING']
208208

209209
def require_jspi(self):
210210
if not is_chrome():
@@ -890,13 +890,13 @@ def test_sdl_canvas(self, args):
890890
@proxied
891891
def test_sdl_canvas_proxy(self):
892892
create_file('data.txt', 'datum')
893-
self.reftest('test_sdl_canvas_proxy.c', 'test_sdl_canvas_proxy.png', cflags=['--proxy-to-worker', '--preload-file', 'data.txt', '-lSDL', '-lGL'])
893+
self.reftest('test_sdl_canvas_proxy.c', 'test_sdl_canvas_proxy.png', cflags=['--proxy-to-worker', '-Wno-deprecated', '--preload-file', 'data.txt', '-lSDL', '-lGL'])
894894

895895
@requires_graphics_hardware
896896
@flaky('https://github.com/emscripten-core/emscripten/issues/25329')
897897
def test_glgears_proxy_jstarget(self):
898898
# test .js target with --proxy-worker; emits 2 js files, client and worker
899-
self.compile_btest('hello_world_gles_proxy.c', ['-o', 'test.js', '--proxy-to-worker', '-sGL_TESTING', '-lGL', '-lglut'])
899+
self.compile_btest('hello_world_gles_proxy.c', ['-o', 'test.js', '--proxy-to-worker', '-Wno-deprecated', '-sGL_TESTING', '-lGL', '-lglut'])
900900
shell_with_script('shell_minimal.html', 'test.html', '<script src="test.js"></script>')
901901
self.make_reftest(test_file('gears.png'))
902902
self.post_manual_reftest()
@@ -972,7 +972,7 @@ def post():
972972
</body>''')
973973
create_file('test.html', html)
974974

975-
self.btest_exit('test_sdl_key_proxy.c', 223092870, cflags=['--proxy-to-worker', '--pre-js', 'pre.js', '-lSDL', '-lGL', '-sRUNTIME_DEBUG'], post_build=post)
975+
self.btest_exit('test_sdl_key_proxy.c', 223092870, cflags=['--proxy-to-worker', '-Wno-deprecated', '--pre-js', 'pre.js', '-lSDL', '-lGL', '-sRUNTIME_DEBUG'], post_build=post)
976976

977977
def test_canvas_focus(self):
978978
self.btest_exit('test_canvas_focus.c', cflags=['--pre-js', test_file('browser/fake_events.js')])
@@ -999,7 +999,7 @@ def post():
999999
create_file('test.html', html)
10001000

10011001
shutil.copy(test_file('browser/fake_events.js'), '.')
1002-
self.btest_exit('browser/test_keydown_preventdefault_proxy.c', 300, cflags=['--proxy-to-worker'], post_build=post)
1002+
self.btest_exit('browser/test_keydown_preventdefault_proxy.c', 300, cflags=['--proxy-to-worker', '-Wno-deprecated'], post_build=post)
10031003

10041004
def test_sdl_text(self):
10051005
create_file('pre.js', '''
@@ -1355,14 +1355,14 @@ def test_fs_workerfs_read(self):
13551355
}, '/work');
13561356
};
13571357
''' % (secret, secret2))
1358-
self.btest_exit('fs/test_workerfs_read.c', cflags=['-lworkerfs.js', '--pre-js', 'pre.js', f'-DSECRET="{secret}"', f'-DSECRET2="{secret2}"', '--proxy-to-worker', '-lworkerfs.js'])
1358+
self.btest_exit('fs/test_workerfs_read.c', cflags=['-lworkerfs.js', '--pre-js', 'pre.js', f'-DSECRET="{secret}"', f'-DSECRET2="{secret2}"', '--proxy-to-worker', '-Wno-deprecated', '-lworkerfs.js'])
13591359

13601360
def test_fs_workerfs_package(self):
13611361
create_file('file1.txt', 'first')
13621362
ensure_dir('sub')
13631363
create_file('sub/file2.txt', 'second')
13641364
self.run_process([FILE_PACKAGER, 'files.data', '--preload', 'file1.txt', 'sub/file2.txt', '--separate-metadata', '--js-output=files.js'])
1365-
self.btest('fs/test_workerfs_package.c', '1', cflags=['-lworkerfs.js', '--proxy-to-worker', '-lworkerfs.js'])
1365+
self.btest('fs/test_workerfs_package.c', '1', cflags=['-lworkerfs.js', '--proxy-to-worker', '-Wno-deprecated', '-lworkerfs.js'])
13661366

13671367
def test_fs_lz4fs_package(self):
13681368
# generate data
@@ -1450,7 +1450,7 @@ def test_idbstore_sync(self, asyncify):
14501450

14511451
def test_idbstore_sync_worker(self):
14521452
secret = str(time.time())
1453-
self.btest('test_idbstore_sync_worker.c', expected='0', cflags=['-lidbstore.js', f'-DSECRET="{secret}"', '-O3', '-g2', '--proxy-to-worker', '-sASYNCIFY'])
1453+
self.btest('test_idbstore_sync_worker.c', expected='0', cflags=['-lidbstore.js', f'-DSECRET="{secret}"', '-O3', '-g2', '--proxy-to-worker', '-Wno-deprecated', '-sASYNCIFY'])
14541454

14551455
def test_force_exit(self):
14561456
self.btest_exit('test_force_exit.c')
@@ -1619,7 +1619,7 @@ def test_mmap_lazyfile(self):
16191619
FS.createLazyFile('/', "lazy.txt", "lazydata.dat", true, false);
16201620
}
16211621
''')
1622-
self.cflags += ['--pre-js=pre.js', '--proxy-to-worker']
1622+
self.cflags += ['--pre-js=pre.js', '--proxy-to-worker', '-Wno-deprecated']
16231623
self.btest_exit('test_mmap_lazyfile.c')
16241624

16251625
@no_wasmfs('https://github.com/emscripten-core/emscripten/issues/19608')
@@ -1715,7 +1715,7 @@ def test_glgears_pthreads(self, extra_args=[]): # noqa
17151715
@parameterized({
17161716
'': ([],),
17171717
# Enabling FULL_ES3 also enables ES2 automatically
1718-
'proxy': (['--proxy-to-worker'],),
1718+
'proxy': (['--proxy-to-worker', '-Wno-deprecated'],),
17191719
})
17201720
def test_glgears_long(self, args):
17211721
args += ['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST', '-lGL', '-lglut', '-DANIMATE']
@@ -1886,7 +1886,7 @@ def test_emscripten_main_loop_and_blocker_exit(self):
18861886

18871887
@parameterized({
18881888
'': ([],),
1889-
'worker': (['--proxy-to-worker'],),
1889+
'worker': (['--proxy-to-worker', '-Wno-deprecated'],),
18901890
'pthreads': (['-pthread', '-sPROXY_TO_PTHREAD'],),
18911891
'strict': (['-sSTRICT'],),
18921892
})
@@ -3098,7 +3098,7 @@ def test_sdl2_image_prepare_data(self):
30983098
@proxied
30993099
def test_sdl2_canvas_proxy(self):
31003100
create_file('data.txt', 'datum')
3101-
self.reftest('test_sdl2_canvas_proxy.c', 'test_sdl2_canvas.png', cflags=['-sUSE_SDL=2', '--proxy-to-worker', '--preload-file', 'data.txt'])
3101+
self.reftest('test_sdl2_canvas_proxy.c', 'test_sdl2_canvas.png', cflags=['-sUSE_SDL=2', '--proxy-to-worker', '-Wno-deprecated', '--preload-file', 'data.txt'])
31023102

31033103
def test_sdl2_pumpevents(self):
31043104
# key events should be detected using SDL_PumpEvents
@@ -3174,7 +3174,7 @@ def test_sdl2_canvas_write(self):
31743174
@requires_graphics_hardware
31753175
@proxied
31763176
def test_sdl2_gl_frames_swap(self):
3177-
self.reftest('test_sdl2_gl_frames_swap.c', 'test_sdl2_gl_frames_swap.png', cflags=['--proxy-to-worker', '-sUSE_SDL=2'])
3177+
self.reftest('test_sdl2_gl_frames_swap.c', 'test_sdl2_gl_frames_swap.png', cflags=['--proxy-to-worker', '-Wno-deprecated', '-sUSE_SDL=2'])
31783178

31793179
@requires_graphics_hardware
31803180
def test_sdl2_ttf(self):
@@ -3583,7 +3583,7 @@ def do_run(src, expected_output, cflags):
35833583
''' % expected_output)
35843584
# --proxy-to-worker only on main
35853585
if inworker:
3586-
cflags += ['--proxy-to-worker']
3586+
cflags += ['--proxy-to-worker', '-Wno-deprecated']
35873587
self.btest_exit('test_dylink_dso_needed.c', cflags=['--post-js', 'post.js'] + cflags)
35883588

35893589
self._test_dylink_dso_needed(do_run)
@@ -4098,7 +4098,7 @@ def test_pthread_asan_use_after_free(self):
40984098
@also_with_wasmfs
40994099
def test_pthread_asan_use_after_free_2(self):
41004100
# similiar to test_pthread_asan_use_after_free, but using a pool instead
4101-
# of proxy-to-pthread, and also the allocation happens on the pthread
4101+
# of proxy-to-pthread, and al, '-Wno-experimental'so the allocation happens on the pthread
41024102
# (which tests that it can use the offset converter to get the stack
41034103
# trace there)
41044104
self.btest('pthread/test_pthread_asan_use_after_free_2.cpp', expected='1', cflags=['-fsanitize=address', '-pthread', '-sPTHREAD_POOL_SIZE=1', '--pre-js', test_file('pthread/test_pthread_asan_use_after_free_2.js')])
@@ -4151,21 +4151,21 @@ def test_sigalrm(self):
41514151
self.btest_exit('test_sigalrm.c', cflags=['-O3'])
41524152

41534153
def test_canvas_style_proxy(self):
4154-
self.btest('canvas_style_proxy.c', expected='1', cflags=['--proxy-to-worker', '--shell-file', test_file('canvas_style_proxy_shell.html'), '--pre-js', test_file('canvas_style_proxy_pre.js')])
4154+
self.btest('canvas_style_proxy.c', expected='1', cflags=['--proxy-to-worker', '-Wno-deprecated', '--shell-file', test_file('canvas_style_proxy_shell.html'), '--pre-js', test_file('canvas_style_proxy_pre.js')])
41554155

41564156
def test_canvas_size_proxy(self):
4157-
self.btest('canvas_size_proxy.c', expected='0', cflags=['--proxy-to-worker'])
4157+
self.btest('canvas_size_proxy.c', expected='0', cflags=['--proxy-to-worker', '-Wno-deprecated'])
41584158

41594159
def test_custom_messages_proxy(self):
4160-
self.btest('custom_messages_proxy.c', expected='1', cflags=['--proxy-to-worker', '--shell-file', test_file('custom_messages_proxy_shell.html'), '--post-js', test_file('custom_messages_proxy_postjs.js')])
4160+
self.btest('custom_messages_proxy.c', expected='1', cflags=['--proxy-to-worker', '-Wno-deprecated', '--shell-file', test_file('custom_messages_proxy_shell.html'), '--post-js', test_file('custom_messages_proxy_postjs.js')])
41614161

41624162
@parameterized({
41634163
'': ([],),
41644164
'O1': (['-O1'],),
41654165
'O2': (['-O2'],),
41664166
})
41674167
def test_vanilla_html_when_proxying(self, args):
4168-
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '--proxy-to-worker'] + args)
4168+
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '--proxy-to-worker', '-Wno-deprecated'] + args)
41694169
create_file('test.html', '<script src="test.js"></script>')
41704170
self.run_browser('test.html', '/report_result?0')
41714171

@@ -4561,8 +4561,7 @@ def test_fetch_sync(self):
45614561
@also_with_wasm2js
45624562
def test_fetch_sync_xhr_in_proxy_to_worker(self):
45634563
shutil.copy(test_file('gears.png'), '.')
4564-
self.btest_exit('fetch/test_fetch_sync_xhr.cpp',
4565-
cflags=['-sFETCH_DEBUG', '-sFETCH', '--proxy-to-worker'])
4564+
self.btest_exit('fetch/test_fetch_sync_xhr.cpp', cflags=['-sFETCH_DEBUG', '-sFETCH', '--proxy-to-worker', '-Wno-deprecated'])
45664565

45674566
@disabled('https://github.com/emscripten-core/emscripten/issues/16746')
45684567
def test_fetch_idb_store(self):
@@ -4817,7 +4816,7 @@ def test_single_file_locate_file(self):
48174816

48184817
# Tests that SINGLE_FILE works as intended in a Worker in JS output
48194818
def test_single_file_worker_js(self):
4820-
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '--proxy-to-worker', '-sSINGLE_FILE'])
4819+
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '--proxy-to-worker', '-Wno-deprecated', '-sSINGLE_FILE'])
48214820
create_file('test.html', '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head><body><script src="test.js"></script></body></html>')
48224821
self.run_browser('test.html', '/report_result?0')
48234822
self.assertExists('test.js')

test/test_other.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,8 +3559,8 @@ def test_embind_tsgen_worker_env(self):
35593559
self.cflags += ['-lembind', '--emit-tsd', 'embind_tsgen.d.ts']
35603560
# Passing -sWASM_WORKERS or -sPROXY_TO_WORKER requires the 'worker' environment
35613561
# at link time. Verify that TS binding generation still works in this case.
3562-
for flag in ('-sWASM_WORKERS', '-sPROXY_TO_WORKER'):
3563-
self.emcc(test_file('other/embind_tsgen.cpp'), [flag])
3562+
for flags in (['-sWASM_WORKERS'], ['-sPROXY_TO_WORKER', '-Wno-deprecated']):
3563+
self.emcc(test_file('other/embind_tsgen.cpp'), flags)
35643564
self.assertFileContents(test_file('other/embind_tsgen.d.ts'), read_file('embind_tsgen.d.ts'))
35653565

35663566
def test_embind_tsgen_dylink(self):
@@ -8502,9 +8502,9 @@ def test_disable_inlining(self):
85028502
@crossplatform
85038503
@parameterized({
85048504
'': ([],),
8505-
'proxy_to_worker': (['--proxy-to-worker'],),
8505+
'proxy_to_worker': (['--proxy-to-worker', '-Wno-deprecated'],),
85068506
'single_file': (['-sSINGLE_FILE'],),
8507-
'proxy_to_worker_wasm2js': (['--proxy-to-worker', '-sWASM=0'],),
8507+
'proxy_to_worker_wasm2js': (['--proxy-to-worker', '-Wno-deprecated', '-sWASM=0'],),
85088508
})
85098509
def test_output_eol(self, params):
85108510
for eol in ('windows', 'linux'):
@@ -13424,7 +13424,7 @@ def test_default_pthread_stack_size(self):
1342413424
self.do_other_test('test_default_pthread_stack_size.c')
1342513425

1342613426
# Same again but with a --proxy-to-worker
13427-
self.cflags += ['--proxy-to-worker']
13427+
self.cflags += ['--proxy-to-worker', '-Wno-deprecated']
1342813428
self.do_other_test('test_default_pthread_stack_size.c')
1342913429

1343013430
def test_emscripten_set_immediate(self):
@@ -14796,7 +14796,7 @@ def test_standalone_whole_archive(self):
1479614796
'single_file': (['-sSINGLE_FILE'],),
1479714797
})
1479814798
def test_proxy_to_worker(self, args):
14799-
self.do_runf('hello_world.c', cflags=['--proxy-to-worker'] + args)
14799+
self.do_runf('hello_world.c', cflags=['--proxy-to-worker', '-Wno-deprecated'] + args)
1480014800

1480114801
@also_with_standalone_wasm(impure=True)
1480214802
def test_console_out(self):

tools/settings.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@
124124
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
125125
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
126126
'USE_WEBGPU': 'please try migrating to --use-port=emdawnwebgpu, which implements a newer, incompatible version of webgpu.h (see tools/ports/emdawnwebgpu.py for more info)',
127-
'LINKABLE': 'scheduled for removal in favor of SIDE_MODULE/MAIN_MODULE (https://github.com/emscripten-core/emscripten/issues/25262)',
128-
'RELOCATABLE': 'scheduled for removal in favor of SIDE_MODULE/MAIN_MODULE (https://github.com/emscripten-core/emscripten/issues/25262)',
127+
'LINKABLE': 'under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)',
128+
'RELOCATABLE': ' under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)',
129+
'PROXY_TO_WORKER': 'under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)',
130+
'PROXY_TO_WORKER_FILENAME': 'under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)',
129131
}
130132

131133
# Settings that don't need to be externalized when serializing to json because they

0 commit comments

Comments
 (0)