You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce/manage the number of settings in settings.js #8257
tldr; I'd like to try to reduce the number of user-visible settings in settings.js
There are currently over 230 settings values in settings.js.
These settings service many difference purposes. Some are internal-only settings for communicating between python and js code. Some effect the generated code. Some effect library code.
All these settings a modifiable by the user via command line and visible to the user in via the JS "pre-processor". (Are they visible in any other way other than this ifdef system in pre-processor)?
Many of these settings can take more than just 2 values so that combinatorial effect of this is enormous. There is simply no way we can test even a tiny subset of this space.
Some immediate things we can do:
Remove any orphaned settings (settings that are no longer used anywhere)
Find a way to distinguish between user-visible settings and non-user-visible settings
Which settings can come from the command line?
Which settings are internal-only?
Which setttings are visible to user-JS code?
Raise that bar for adding new settings. At least user-visible ones.
Look for opportunities to retire settings.
We've already kind of been doing this but I wanted to create an issue to track this.
Reacted by Alon Zakai, Jacob Gravelle and Dannii Willis
I believe non-user-visible settings are still visible via the command line though, because emcc can call sub-invocations of emcc with different, internal-only arguments. (e.g., here
)
I'd like to say we should disallow those settings via command-line, but then we'd need to have some other mechanism for forwarding that information.
A simple immediate solution might be to move them to an internal_settings.js file, and for those arguments change -s into -s-internal.
Another observation is that because the emscripten driver should be the only user of these internal flags, whatever mechanism we use can be more verbose than if it were user-facing.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
Activity
Remove unused settings from settings.js
Remove unused settings from settings.js
Remove FORCE_ALIGNED_MEMORY from settings.js
Don't allow legacy settings in strict mode
Don't allow legacy settings in strict mode
Remove unused settings from settings.js
Remove FORCE_ALIGNED_MEMORY from settings.js
Remove unused settings from settings.js (#8258)
Remove FORCE_ALIGNED_MEMORY from settings.js
Remove FORCE_ALIGNED_MEMORY from settings.js (#8260)
Remove UNALIGNED_MEMORY from settings.js
Don't allow legacy settings in strict mode
Remove UNALIGNED_MEMORY from settings.js (#8266)
Don't allow legacy settings in strict mode
Don't allow legacy settings in strict mode (#8261)
jgravelle-google commentedon Mar 11, 2019
This is overall a big +1 from me.
I believe non-user-visible settings are still visible via the command line though, because
emcccan call sub-invocations ofemccwith different, internal-only arguments. (e.g., hereemscripten/tools/gen_struct_info.py
Line 396 in 8839054
I'd like to say we should disallow those settings via command-line, but then we'd need to have some other mechanism for forwarding that information.
A simple immediate solution might be to move them to an
internal_settings.jsfile, and for those arguments change-sinto-s-internal.Another observation is that because the emscripten driver should be the only user of these internal flags, whatever mechanism we use can be more verbose than if it were user-facing.
stale commentedon Mar 10, 2020
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
sbc100 commentedon Mar 23, 2020
I feel like we've done a pretty good job on this. Lets call it closed for now/
sbc100 commentedon Mar 23, 2020
Sorry "we've" done a pretty good job