Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix PackageToJS plugin wasm-opt fallback when output file exists#401

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kateinoigakukun merged 1 commit intomainfromfix-packagetojs-wasm-opt-fallback
Aug 9, 2025

Conversation

@kateinoigakukun
Copy link
Member

@kateinoigakukunkateinoigakukun commentedAug 9, 2025
edited
Loading

Fixes a bug where PackageToJS builds fail when wasm-opt is not installed and the output file already exists.

The plugin falls back to copying the input file when wasm-opt is unavailable, but FileManager.copyItem throws an error if the destination exists. This causes "File exists" build failures.

The fix removes any existing output file before copying, matching wasm-opt's overwrite behavior. Also makes DefaultPackagingSystem injectable for cleaner testing.

@kateinoigakukunkateinoigakukunforce-pushed thefix-packagetojs-wasm-opt-fallback branch 3 times, most recently from6dca4f7 to40c79f7CompareAugust 9, 2025 07:41
When wasm-opt is not installed, DefaultPackagingSystem falls back to copyingthe input Wasm file directly to output. However, FileManager.copyItemfails if the destination file already exists, while wasm-opt overwritesexisting files.Changes:- Remove existing output file before copying in wasm-opt fallback- Make DefaultPackagingSystem injectable for testing with custom which function- Add focused tests for DefaultPackagingSystem fallback behavior- Test both new and existing output file scenariosFixes issue where builds fail with 'File exists' error when wasm-optis unavailable and output file already exists from previous builds.
@kateinoigakukunkateinoigakukunforce-pushed thefix-packagetojs-wasm-opt-fallback branch from40c79f7 tob579fb1CompareAugust 9, 2025 07:47
@kateinoigakukunkateinoigakukun merged commita1e6905 intomainAug 9, 2025
8 checks passed
@kateinoigakukunkateinoigakukun deleted the fix-packagetojs-wasm-opt-fallback branchAugust 9, 2025 07:59
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kateinoigakukun

[8]ページ先頭

©2009-2025 Movatter.jp