Skip to content

Remove debug-parser option and other unused variables#2739

Merged
zherczeg merged 1 commit into
WebAssembly:mainfrom
zherczeg:clang_fix
Apr 7, 2026
Merged

Remove debug-parser option and other unused variables#2739
zherczeg merged 1 commit into
WebAssembly:mainfrom
zherczeg:clang_fix

Conversation

@zherczeg

@zherczeg zherczeg commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

The support for --debug-parser is removed from the project after the parser has been reworked. This patch removes the command line option as well.

Would not be bad to change the "Use multiple times for more info" to something else.

Comment thread src/tools/wast2json.cc
s_log_stream = FileStream::CreateStderr();
});
parser.AddOption("debug-parser", "Turn on debugging the parser of wast files",
[]() { s_debug_parsing = true; });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this flag used to work in the past? Maybe we should make it work rather than removing it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do? It is added here, replacing another flag:
bc3deb3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   parser.AddOption("debug-parser", "Turn on debugging the parser of wast files",
-                   []() { s_parse_options.debug_parsing = true; });
+                   []() { s_debug_parsing = true; });

This was the actual change

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A flag still present here, but it seems nothing is using it.
https://github.com/WebAssembly/wabt/blob/main/include/wabt/wast-parser.h#L37

Perhaps some plans changed?

Comment thread src/tools/wat2wasm.cc
s_log_stream = FileStream::CreateStderr();
});
parser.AddOption("debug-parser", "Turn on debugging the parser of wat files",
[]() { s_debug_parsing = true; });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % question

@zherczeg zherczeg force-pushed the clang_fix branch 4 times, most recently from 1742eb4 to c3256a3 Compare April 6, 2026 16:17
@sbc100

sbc100 commented Apr 6, 2026

Copy link
Copy Markdown
Member

It looks like the debug parser setting was removed back in #591 when the parser was re-written. So I think its safe to remove these command line flags, but maybe mention that in the PR description and maybe even add to the PR title?

The support for --debug-parser is removed from the project
after the parser has been reworked. This patch removes the
command line option as well.
@zherczeg zherczeg changed the title Remove unused variables Remove debug-parser option and other unused variables Apr 6, 2026
@zherczeg zherczeg merged commit 6dc6cfd into WebAssembly:main Apr 7, 2026
17 checks passed
@zherczeg zherczeg deleted the clang_fix branch April 7, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants