Skip to content

[NFC] Improve wasm-reduce help text #7293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 24, 2025
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Feb 13, 2025

No description provided.

Whatever the command does, we will preserve as we copy progressively smaller
files to t.wasm. As we make progress, the smallest file will be written to
the working file, w.wasm, and when reduction is done you will find the final
result there.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I'm doing it wrong, but when I run the example command above, I see a t.wasm generated but no w.wasm.

The full output of the run:

|wasm-reduce
|input: <snip>
|test: t.wasm
|working: w.wasm
|bin dir: <snip>
|extra flags: -all
|expected result:
[ProgramResult] code: 0 stdout:
[====]
in 0.092609 seconds
[/ProgramResult]

|!! Make sure the above is what you expect! !!

|checking that command has different behavior on different inputs (this verifies that the test file is used by the command)
|checking that command has expected behavior on canonicalized (read-written) binary
|! failed to read and write the binary
[ProgramResult] code: 31744 stdout:
[====]
in 2.03463 seconds
[/ProgramResult]

Fatal: |! stopping, as it is very unlikely reduction can succeed (use -f to ignore this check)

Copy link
Member Author

Choose a reason for hiding this comment

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

(discussed offline, but for others reading, my suggestions were --timeout=10 and/or --text, and if neither works, to send me the file to investigate)

@kripken kripken requested a review from tlively April 24, 2025 20:47
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

Looks good!

@kripken kripken merged commit e6d02fa into WebAssembly:main Apr 24, 2025
14 checks passed
@kripken kripken deleted the wasm.reduce branch April 24, 2025 21:58
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.

3 participants