Skip to content

Commit 023eaf9

Browse files
authored
Move LEGACY_SETTINGS into settings.py (#25596)
This data structure makes more sense alongside all the other lists in this file like `COMPILE_TIME_SETTINGS` and `DEPRECATED_SETTINGS`. One of the main reasons for having `LEGACY_SETTINGS` in settings.js was that it was visible for those directly browsing the `.js` file. However, we now have an auto-generated `.rst` file that is the more common way for folks to read about settings. See https://emscripten.org/docs/tools_reference/settings_reference.html I updated this auto-generated document to contain this info.
1 parent 458ce4d commit 023eaf9

File tree

4 files changed

+236
-95
lines changed

4 files changed

+236
-95
lines changed

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,3 +3353,107 @@ CROSS_ORIGIN uses an inline worker to instead load the worker script
33533353
indirectly using `importScripts`
33543354

33553355
Default value: false
3356+
3357+
.. _deprecated-settings:
3358+
3359+
===================
3360+
Deprecated Settings
3361+
===================
3362+
3363+
The following settings have been proposed for removal from emscripten. These settings
3364+
still function but may be removed in a future version. If your project is using of
3365+
the these settings please open a bug (or reply to one of the existing bugs).
3366+
3367+
- ``RUNTIME_LINKED_LIBS``: you can simply list the libraries directly on the commandline now
3368+
- ``CLOSURE_WARNINGS``: use -Wclosure/-Wno-closure instead
3369+
- ``LEGALIZE_JS_FFI``: to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`
3370+
- ``ASYNCIFY_EXPORTS``: please use JSPI_EXPORTS instead
3371+
- ``LINKABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)
3372+
- ``RELOCATABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)
3373+
- ``PROXY_TO_WORKER``: under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)
3374+
- ``PROXY_TO_WORKER_FILENAME``: under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)
3375+
3376+
.. _legacy-settings:
3377+
3378+
===============
3379+
Legacy Settings
3380+
===============
3381+
3382+
The following settings no longer have any effect but are still accepted by emscripten
3383+
for backwards compatbility with older versions:
3384+
3385+
- ``BINARYEN``: Valid values: WASM
3386+
- ``TOTAL_STACK``: Valid values: STACK_SIZE
3387+
- ``BINARYEN_ASYNC_COMPILATION``: Valid values: WASM_ASYNC_COMPILATION
3388+
- ``UNALIGNED_MEMORY``: forced unaligned memory not supported in fastcomp (Valid values: [0])
3389+
- ``FORCE_ALIGNED_MEMORY``: forced aligned memory is not supported in fastcomp (Valid values: [0])
3390+
- ``PGO``: pgo no longer supported (Valid values: [0])
3391+
- ``QUANTUM_SIZE``: altering the QUANTUM_SIZE is not supported (Valid values: [4])
3392+
- ``FUNCTION_POINTER_ALIGNMENT``: Starting from Emscripten 1.37.29, no longer available (https://github.com/emscripten-core/emscripten/pull/6091) (Valid values: [2])
3393+
- ``RESERVED_FUNCTION_POINTERS``: Valid values: ALLOW_TABLE_GROWTH
3394+
- ``BUILD_AS_SHARED_LIB``: Starting from Emscripten 1.38.16, no longer available (https://github.com/emscripten-core/emscripten/pull/7433) (Valid values: [0])
3395+
- ``SAFE_SPLIT_MEMORY``: Starting from Emscripten 1.38.19, SAFE_SPLIT_MEMORY codegen is no longer available (https://github.com/emscripten-core/emscripten/pull/7465) (Valid values: [0])
3396+
- ``SPLIT_MEMORY``: Starting from Emscripten 1.38.19, SPLIT_MEMORY codegen is no longer available (https://github.com/emscripten-core/emscripten/pull/7465) (Valid values: [0])
3397+
- ``BINARYEN_METHOD``: Starting from Emscripten 1.38.23, Emscripten now always builds either to Wasm (-sWASM - default), or to JavaScript (-sWASM=0), other methods are not supported (https://github.com/emscripten-core/emscripten/pull/7836) (Valid values: ['native-wasm'])
3398+
- ``BINARYEN_TRAP_MODE``: The wasm backend does not support a trap mode (it always clamps, in effect) (Valid values: [-1])
3399+
- ``PRECISE_I64_MATH``: Starting from Emscripten 1.38.26, PRECISE_I64_MATH is always enabled (https://github.com/emscripten-core/emscripten/pull/7935) (Valid values: [1, 2])
3400+
- ``MEMFS_APPEND_TO_TYPED_ARRAYS``: Starting from Emscripten 1.38.26, MEMFS_APPEND_TO_TYPED_ARRAYS=0 is no longer supported. MEMFS no longer supports using JS arrays for file data (https://github.com/emscripten-core/emscripten/pull/7918) (Valid values: [1])
3401+
- ``ERROR_ON_MISSING_LIBRARIES``: missing libraries are always an error now (Valid values: [1])
3402+
- ``EMITTING_JS``: The new STANDALONE_WASM flag replaces this (replace EMITTING_JS=0 with STANDALONE_WASM=1) (Valid values: [1])
3403+
- ``SKIP_STACK_IN_SMALL``: SKIP_STACK_IN_SMALL is no longer needed as the backend can optimize it directly (Valid values: [0, 1])
3404+
- ``SAFE_STACK``: Replace SAFE_STACK=1 with STACK_OVERFLOW_CHECK=2 (Valid values: [0])
3405+
- ``MEMORY_GROWTH_STEP``: Valid values: MEMORY_GROWTH_LINEAR_STEP
3406+
- ``ELIMINATE_DUPLICATE_FUNCTIONS``: Duplicate function elimination for wasm is handled automatically by binaryen (Valid values: [0, 1])
3407+
- ``ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS``: Duplicate function elimination for wasm is handled automatically by binaryen (Valid values: [0])
3408+
- ``ELIMINATE_DUPLICATE_FUNCTIONS_PASSES``: Duplicate function elimination for wasm is handled automatically by binaryen (Valid values: [5])
3409+
- ``WASM_OBJECT_FILES``: For LTO, use -flto or -fto=thin instead; to disable LTO, just do not pass WASM_OBJECT_FILES=1 as 1 is the default anyhow (Valid values: [0, 1])
3410+
- ``TOTAL_MEMORY``: Valid values: INITIAL_MEMORY
3411+
- ``WASM_MEM_MAX``: Valid values: MAXIMUM_MEMORY
3412+
- ``BINARYEN_MEM_MAX``: Valid values: MAXIMUM_MEMORY
3413+
- ``BINARYEN_PASSES``: Use BINARYEN_EXTRA_PASSES to add additional passes (Valid values: [''])
3414+
- ``SWAPPABLE_ASM_MODULE``: Fully swappable asm modules are no longer supported (Valid values: [0])
3415+
- ``ASM_JS``: asm.js output is not supported anymore (Valid values: [1])
3416+
- ``FINALIZE_ASM_JS``: asm.js output is not supported anymore (Valid values: [0, 1])
3417+
- ``ASYNCIFY_WHITELIST``: Valid values: ASYNCIFY_ONLY
3418+
- ``ASYNCIFY_BLACKLIST``: Valid values: ASYNCIFY_REMOVE
3419+
- ``EXCEPTION_CATCHING_WHITELIST``: Valid values: EXCEPTION_CATCHING_ALLOWED
3420+
- ``SEPARATE_ASM``: Separate asm.js only made sense for fastcomp with asm.js output (Valid values: [0])
3421+
- ``SEPARATE_ASM_MODULE_NAME``: Separate asm.js only made sense for fastcomp with asm.js output (Valid values: [''])
3422+
- ``FAST_UNROLLED_MEMCPY_AND_MEMSET``: The wasm backend implements memcpy/memset in C (Valid values: [0, 1])
3423+
- ``DOUBLE_MODE``: The wasm backend always implements doubles normally (Valid values: [0, 1])
3424+
- ``PRECISE_F32``: The wasm backend always implements floats normally (Valid values: [0, 1, 2])
3425+
- ``ALIASING_FUNCTION_POINTERS``: The wasm backend always uses a single index space for function pointers, in a single Table (Valid values: [0, 1])
3426+
- ``AGGRESSIVE_VARIABLE_ELIMINATION``: Wasm ignores asm.js-specific optimization flags (Valid values: [0, 1])
3427+
- ``SIMPLIFY_IFS``: Wasm ignores asm.js-specific optimization flags (Valid values: [1])
3428+
- ``DEAD_FUNCTIONS``: The wasm backend does not support dead function removal (Valid values: [[]])
3429+
- ``WASM_BACKEND``: Only the wasm backend is now supported (note that setting it as -s has never been allowed anyhow) (Valid values: [-1])
3430+
- ``EXPORT_BINDINGS``: No longer needed (Valid values: [0, 1])
3431+
- ``RUNNING_JS_OPTS``: Fastcomp cared about running JS which could alter asm.js validation, but not upstream (Valid values: [0])
3432+
- ``EXPORT_FUNCTION_TABLES``: No longer needed (Valid values: [0])
3433+
- ``BINARYEN_SCRIPTS``: No longer needed (Valid values: [''])
3434+
- ``WARN_UNALIGNED``: No longer needed (Valid values: [0, 1])
3435+
- ``ASM_PRIMITIVE_VARS``: No longer needed (Valid values: [[]])
3436+
- ``WORKAROUND_IOS_9_RIGHT_SHIFT_BUG``: Wasm2JS does not support iPhone 4s, iPad 2, iPad 3, iPad Mini 1, Pod Touch 5 (devices with end-of-life at iOS 9.3.5) and older (Valid values: [0])
3437+
- ``RUNTIME_FUNCS_TO_IMPORT``: No longer needed (Valid values: [[]])
3438+
- ``LIBRARY_DEPS_TO_AUTOEXPORT``: No longer needed (Valid values: [[]])
3439+
- ``EMIT_EMSCRIPTEN_METADATA``: No longer supported (Valid values: [0])
3440+
- ``SHELL_FILE``: No longer supported (Valid values: [''])
3441+
- ``LLD_REPORT_UNDEFINED``: Disabling is no longer supported (Valid values: [1])
3442+
- ``MEM_INIT_METHOD``: No longer supported (Valid values: [0])
3443+
- ``USE_PTHREADS``: No longer needed. Use -pthread instead (Valid values: [0, 1])
3444+
- ``USES_DYNAMIC_ALLOC``: No longer supported. Use -sMALLOC=none (Valid values: [1])
3445+
- ``REVERSE_DEPS``: No longer needed (Valid values: ['auto', 'all', 'none'])
3446+
- ``RUNTIME_LOGGING``: Valid values: RUNTIME_DEBUG
3447+
- ``MIN_EDGE_VERSION``: No longer supported (Valid values: [2147483647])
3448+
- ``MIN_IE_VERSION``: No longer supported (Valid values: [2147483647])
3449+
- ``WORKAROUND_OLD_WEBGL_UNIFORM_UPLOAD_IGNORED_OFFSET_BUG``: No longer supported (Valid values: [0])
3450+
- ``AUTO_ARCHIVE_INDEXES``: No longer needed (Valid values: [0, 1])
3451+
- ``USE_ES6_IMPORT_META``: Disabling is no longer supported (Valid values: [1])
3452+
- ``EXTRA_EXPORTED_RUNTIME_METHODS``: No longer supported, use EXPORTED_RUNTIME_METHODS (Valid values: [[]])
3453+
- ``SUPPORT_ERRNO``: No longer supported (Valid values: [0])
3454+
- ``DEMANGLE_SUPPORT``: No longer supported (Valid values: [0])
3455+
- ``MAYBE_WASM2JS``: No longer supported (use -sWASM=2) (Valid values: [0])
3456+
- ``HEADLESS``: No longer supported, use headless browsers or Node.js with JSDOM (Valid values: [0])
3457+
- ``USE_OFFSET_COVERTER``: No longer supported, not needed with modern v8 versions (Valid values: [0])
3458+
- ``ASYNCIFY_LAZY_LOAD_CODE``: No longer supported (Valid values: [0])
3459+
- ``USE_WEBGPU``: No longer supported; replaced by --use-port=emdawnwebgpu, which implements a newer (but incompatible) version of webgpu.h - see tools/ports/emdawnwebgpu.py (Valid values: [0])

src/settings.js

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,95 +2192,3 @@ var WASM_JS_TYPES = false;
21922192
// CROSS_ORIGIN uses an inline worker to instead load the worker script
21932193
// indirectly using `importScripts`
21942194
var CROSS_ORIGIN = false;
2195-
2196-
// For renamed settings the format is:
2197-
// [OLD_NAME, NEW_NAME]
2198-
// For removed settings (which now effectively have a fixed value and can no
2199-
// longer be changed) the format is:
2200-
// [OPTION_NAME, POSSIBLE_VALUES, ERROR_EXPLANATION], where POSSIBLE_VALUES is
2201-
// an array of values that will still be silently accepted by the compiler.
2202-
// First element in the list is the canonical/fixed value going forward.
2203-
// This allows existing build systems to keep specifying one of the supported
2204-
// settings, for backwards compatibility.
2205-
// When a setting has been removed, and we want to error on all values of it,
2206-
// we can set POSSIBLE_VALUES to an impossible value (like "disallowed" for a
2207-
// numeric setting, or -1 for a string setting).
2208-
var LEGACY_SETTINGS = [
2209-
['BINARYEN', 'WASM'],
2210-
['TOTAL_STACK', 'STACK_SIZE'],
2211-
['BINARYEN_ASYNC_COMPILATION', 'WASM_ASYNC_COMPILATION'],
2212-
['UNALIGNED_MEMORY', [0], 'forced unaligned memory not supported in fastcomp'],
2213-
['FORCE_ALIGNED_MEMORY', [0], 'forced aligned memory is not supported in fastcomp'],
2214-
['PGO', [0], 'pgo no longer supported'],
2215-
['QUANTUM_SIZE', [4], 'altering the QUANTUM_SIZE is not supported'],
2216-
['FUNCTION_POINTER_ALIGNMENT', [2], 'Starting from Emscripten 1.37.29, no longer available (https://github.com/emscripten-core/emscripten/pull/6091)'],
2217-
// Reserving function pointers is not needed - allowing table growth allows any number of new functions to be added.
2218-
['RESERVED_FUNCTION_POINTERS', 'ALLOW_TABLE_GROWTH'],
2219-
['BUILD_AS_SHARED_LIB', [0], 'Starting from Emscripten 1.38.16, no longer available (https://github.com/emscripten-core/emscripten/pull/7433)'],
2220-
['SAFE_SPLIT_MEMORY', [0], 'Starting from Emscripten 1.38.19, SAFE_SPLIT_MEMORY codegen is no longer available (https://github.com/emscripten-core/emscripten/pull/7465)'],
2221-
['SPLIT_MEMORY', [0], 'Starting from Emscripten 1.38.19, SPLIT_MEMORY codegen is no longer available (https://github.com/emscripten-core/emscripten/pull/7465)'],
2222-
['BINARYEN_METHOD', ['native-wasm'], 'Starting from Emscripten 1.38.23, Emscripten now always builds either to Wasm (-sWASM - default), or to JavaScript (-sWASM=0), other methods are not supported (https://github.com/emscripten-core/emscripten/pull/7836)'],
2223-
['BINARYEN_TRAP_MODE', [-1], 'The wasm backend does not support a trap mode (it always clamps, in effect)'],
2224-
['PRECISE_I64_MATH', [1, 2], 'Starting from Emscripten 1.38.26, PRECISE_I64_MATH is always enabled (https://github.com/emscripten-core/emscripten/pull/7935)'],
2225-
['MEMFS_APPEND_TO_TYPED_ARRAYS', [1], 'Starting from Emscripten 1.38.26, MEMFS_APPEND_TO_TYPED_ARRAYS=0 is no longer supported. MEMFS no longer supports using JS arrays for file data (https://github.com/emscripten-core/emscripten/pull/7918)'],
2226-
['ERROR_ON_MISSING_LIBRARIES', [1], 'missing libraries are always an error now'],
2227-
['EMITTING_JS', [1], 'The new STANDALONE_WASM flag replaces this (replace EMITTING_JS=0 with STANDALONE_WASM=1)'],
2228-
['SKIP_STACK_IN_SMALL', [0, 1], 'SKIP_STACK_IN_SMALL is no longer needed as the backend can optimize it directly'],
2229-
['SAFE_STACK', [0], 'Replace SAFE_STACK=1 with STACK_OVERFLOW_CHECK=2'],
2230-
['MEMORY_GROWTH_STEP', 'MEMORY_GROWTH_LINEAR_STEP'],
2231-
['ELIMINATE_DUPLICATE_FUNCTIONS', [0, 1], 'Duplicate function elimination for wasm is handled automatically by binaryen'],
2232-
['ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS', [0], 'Duplicate function elimination for wasm is handled automatically by binaryen'],
2233-
['ELIMINATE_DUPLICATE_FUNCTIONS_PASSES', [5], 'Duplicate function elimination for wasm is handled automatically by binaryen'],
2234-
// WASM_OBJECT_FILES is handled in emcc.py, supporting both 0 and 1 for now.
2235-
['WASM_OBJECT_FILES', [0, 1], 'For LTO, use -flto or -fto=thin instead; to disable LTO, just do not pass WASM_OBJECT_FILES=1 as 1 is the default anyhow'],
2236-
['TOTAL_MEMORY', 'INITIAL_MEMORY'],
2237-
['WASM_MEM_MAX', 'MAXIMUM_MEMORY'],
2238-
['BINARYEN_MEM_MAX', 'MAXIMUM_MEMORY'],
2239-
['BINARYEN_PASSES', [''], 'Use BINARYEN_EXTRA_PASSES to add additional passes'],
2240-
['SWAPPABLE_ASM_MODULE', [0], 'Fully swappable asm modules are no longer supported'],
2241-
['ASM_JS', [1], 'asm.js output is not supported anymore'],
2242-
['FINALIZE_ASM_JS', [0, 1], 'asm.js output is not supported anymore'],
2243-
['ASYNCIFY_WHITELIST', 'ASYNCIFY_ONLY'],
2244-
['ASYNCIFY_BLACKLIST', 'ASYNCIFY_REMOVE'],
2245-
['EXCEPTION_CATCHING_WHITELIST', 'EXCEPTION_CATCHING_ALLOWED'],
2246-
['SEPARATE_ASM', [0], 'Separate asm.js only made sense for fastcomp with asm.js output'],
2247-
['SEPARATE_ASM_MODULE_NAME', [''], 'Separate asm.js only made sense for fastcomp with asm.js output'],
2248-
['FAST_UNROLLED_MEMCPY_AND_MEMSET', [0, 1], 'The wasm backend implements memcpy/memset in C'],
2249-
['DOUBLE_MODE', [0, 1], 'The wasm backend always implements doubles normally'],
2250-
['PRECISE_F32', [0, 1, 2], 'The wasm backend always implements floats normally'],
2251-
['ALIASING_FUNCTION_POINTERS', [0, 1], 'The wasm backend always uses a single index space for function pointers, in a single Table'],
2252-
['AGGRESSIVE_VARIABLE_ELIMINATION', [0, 1], 'Wasm ignores asm.js-specific optimization flags'],
2253-
['SIMPLIFY_IFS', [1], 'Wasm ignores asm.js-specific optimization flags'],
2254-
['DEAD_FUNCTIONS', [[]], 'The wasm backend does not support dead function removal'],
2255-
['WASM_BACKEND', [-1], 'Only the wasm backend is now supported (note that setting it as -s has never been allowed anyhow)'],
2256-
['EXPORT_BINDINGS', [0, 1], 'No longer needed'],
2257-
['RUNNING_JS_OPTS', [0], 'Fastcomp cared about running JS which could alter asm.js validation, but not upstream'],
2258-
['EXPORT_FUNCTION_TABLES', [0], 'No longer needed'],
2259-
['BINARYEN_SCRIPTS', [''], 'No longer needed'],
2260-
['WARN_UNALIGNED', [0, 1], 'No longer needed'],
2261-
['ASM_PRIMITIVE_VARS', [[]], 'No longer needed'],
2262-
['WORKAROUND_IOS_9_RIGHT_SHIFT_BUG', [0], 'Wasm2JS does not support iPhone 4s, iPad 2, iPad 3, iPad Mini 1, Pod Touch 5 (devices with end-of-life at iOS 9.3.5) and older'],
2263-
['RUNTIME_FUNCS_TO_IMPORT', [[]], 'No longer needed'],
2264-
['LIBRARY_DEPS_TO_AUTOEXPORT', [[]], 'No longer needed'],
2265-
['EMIT_EMSCRIPTEN_METADATA', [0], 'No longer supported'],
2266-
['SHELL_FILE', [''], 'No longer supported'],
2267-
['LLD_REPORT_UNDEFINED', [1], 'Disabling is no longer supported'],
2268-
['MEM_INIT_METHOD', [0], 'No longer supported'],
2269-
['USE_PTHREADS', [0, 1], 'No longer needed. Use -pthread instead'],
2270-
['USES_DYNAMIC_ALLOC', [1], 'No longer supported. Use -sMALLOC=none'],
2271-
['REVERSE_DEPS', ['auto', 'all', 'none'], 'No longer needed'],
2272-
['RUNTIME_LOGGING', 'RUNTIME_DEBUG'],
2273-
['MIN_EDGE_VERSION', [0x7FFFFFFF], 'No longer supported'],
2274-
['MIN_IE_VERSION', [0x7FFFFFFF], 'No longer supported'],
2275-
['WORKAROUND_OLD_WEBGL_UNIFORM_UPLOAD_IGNORED_OFFSET_BUG', [0], 'No longer supported'],
2276-
['AUTO_ARCHIVE_INDEXES', [0, 1], 'No longer needed'],
2277-
['USE_ES6_IMPORT_META', [1], 'Disabling is no longer supported'],
2278-
['EXTRA_EXPORTED_RUNTIME_METHODS', [[]], 'No longer supported, use EXPORTED_RUNTIME_METHODS'],
2279-
['SUPPORT_ERRNO', [0], 'No longer supported'],
2280-
['DEMANGLE_SUPPORT', [0], 'No longer supported'],
2281-
['MAYBE_WASM2JS', [0], 'No longer supported (use -sWASM=2)'],
2282-
['HEADLESS', [0], 'No longer supported, use headless browsers or Node.js with JSDOM'],
2283-
['USE_OFFSET_COVERTER', [0], 'No longer supported, not needed with modern v8 versions'],
2284-
['ASYNCIFY_LAZY_LOAD_CODE', [0], 'No longer supported'],
2285-
['USE_WEBGPU', [0], 'No longer supported; replaced by --use-port=emdawnwebgpu, which implements a newer (but incompatible) version of webgpu.h - see tools/ports/emdawnwebgpu.py'],
2286-
];

tools/maint/update_settings_docs.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
sys.path.insert(0, root_dir)
2727

2828
from tools.utils import path_from_root, read_file, safe_ensure_dirs
29+
from tools.settings import LEGACY_SETTINGS, DEPRECATED_SETTINGS
2930

3031
header = '''\
3132
.. _settings-reference:
@@ -53,6 +54,31 @@
5354
'deprecated': 'This setting is deprecated',
5455
}
5556

57+
deprecated_header = '''
58+
.. _deprecated-settings:
59+
60+
===================
61+
Deprecated Settings
62+
===================
63+
64+
The following settings have been proposed for removal from emscripten. These settings
65+
still function but may be removed in a future version. If your project is using of
66+
the these settings please open a bug (or reply to one of the existing bugs).
67+
68+
'''
69+
70+
legacy_header = '''
71+
.. _legacy-settings:
72+
73+
===============
74+
Legacy Settings
75+
===============
76+
77+
The following settings no longer have any effect but are still accepted by emscripten
78+
for backwards compatbility with older versions:
79+
80+
'''
81+
5682
output_file = path_from_root('site/source/docs/tools_reference/settings_reference.rst')
5783

5884

@@ -80,8 +106,6 @@ def write_file(f):
80106
current_comment = []
81107
current_tags = []
82108
for line in read_file(path_from_root('src/settings.js')).splitlines():
83-
if 'LEGACY_SETTINGS' in line:
84-
break
85109
if not line:
86110
current_comment = []
87111
current_tags = []
@@ -107,6 +131,19 @@ def write_file(f):
107131
current_comment = []
108132
current_tags = []
109133

134+
f.write(deprecated_header)
135+
136+
for name, desc in DEPRECATED_SETTINGS.items():
137+
f.write(f' - ``{name}``: {desc}\n')
138+
139+
f.write(legacy_header)
140+
141+
for name, values, *extra_fields in LEGACY_SETTINGS:
142+
desc = f'Valid values: {values}'
143+
if extra_fields:
144+
desc = f'{extra_fields[0]} ({desc})'
145+
f.write(f' - ``{name}``: {desc}\n')
146+
110147

111148
def main(args):
112149
if '--check' in args:

0 commit comments

Comments
 (0)