Skip to content

Allow customising linker OutputDirectory#6933

Open
Quafadas wants to merge 10 commits intocom-lihaoyi:mainfrom
Quafadas:js_output_file_dir
Open

Allow customising linker OutputDirectory#6933
Quafadas wants to merge 10 commits intocom-lihaoyi:mainfrom
Quafadas:js_output_file_dir

Conversation

@Quafadas
Copy link
Contributor

@Quafadas Quafadas commented Mar 13, 2026

Companion to #6932 .

I think this is the minimally invasive change which enables this.

Tests use a copy (taken from scala js repo) of the MemOutputDirectory.scala to check that the linking functions write into a CustomOutput writer as expected.

Whether it's a good idea or not is up for discussion; it seems to be philosophically compatible with ScalaJSConfigModule. My motivation is to experiment with post-processing the linker outputs in a plugin. Link -> re-write -> Hash -> refresh loop without disk IO overhead.

Ideally; I think it would have been possible to do that experiment without changing mill. That seems to me both an argument for and against this PR.

@Quafadas Quafadas changed the title js output file dir Allow customising linker OutputDirectory Mar 13, 2026
@Quafadas Quafadas marked this pull request as ready for review March 16, 2026 12:54
@Quafadas
Copy link
Contributor Author

To me, the failing test does not look related to this PR?

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.

1 participant