Skip to content

Remove the multi-file Scala.js linked output directory recursively - #4549

Merged
Gedochao merged 1 commit into
VirtusLab:mainfrom
sideeffffect:fix/js-linked-output-dir-cleanup
Oct 16, 2026
Merged

Gedochao merged 1 commit into
VirtusLab:mainfrom
sideeffffect:fix/js-linked-output-dir-cleanup

Conversation

@sideeffffect

@sideeffffect sideeffffect commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This comes up with more complex Scala Wasm setups.

@sideeffffect
sideeffffect marked this pull request as ready for review October 13, 2026 20:09
@Gedochao

Copy link
Copy Markdown
Contributor

note: please fill our PR template when contributing.

@Gedochao Gedochao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

With the Wasm backend (or JS module splitting) the linker emits several
files, so Package.linkJs turns the temporary destination into a
directory. The cleanup used os.remove, which throws
DirectoryNotEmptyException: `scala-cli test --js-emit-wasm` exited 1
after all tests passed, and `run` leaked the directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gedochao
Gedochao force-pushed the fix/js-linked-output-dir-cleanup branch from d984dbf to 36c94e8 Compare October 15, 2026 15:22
@Gedochao

Copy link
Copy Markdown
Contributor

(rebased)

@Gedochao
Gedochao merged commit 63f0fbb into VirtusLab:main Oct 16, 2026
81 of 84 checks passed
@sideeffffect
sideeffffect deleted the fix/js-linked-output-dir-cleanup branch October 16, 2026 12:45
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