Skip to content

refactor(build): eliminate dedicated output directories - #116

Merged
justjavac merged 2 commits into
mainfrom
milky/simplify-build-output
Aug 13, 2026
Merged

refactor(build): eliminate dedicated output directories#116
justjavac merged 2 commits into
mainfrom
milky/simplify-build-output

Conversation

@Milky2018

Copy link
Copy Markdown
Contributor

Summary

  • remove Proton-specific build and test output directories
  • use Moon's standard _build tree for ordinary builds and package inputs
  • write final application artifacts to dist
  • isolate E2E builds and filesystem tests in system temporary directories
  • rewrite the macOS executable rpath while staging the application bundle

Background

Proton had accumulated several parallel output layouts: Moon's normal _build,
target/proton-package-build, repository-local E2E target directories, and
fixed test directories under the repository. These directories duplicated
Moon's build ownership, complicated cleanup, and made nested code generation
and packaging depend on paths that Proton had to predict and preserve.

This change gives each kind of output one owner:

  • Moon owns ordinary build intermediates in _build.
  • Proton writes only final distributable artifacts to dist.
  • .proton remains reserved for installed CEF/runtime state.
  • E2E and mutable filesystem fixtures use system temporary directories.
  • Static parser/catalog fixtures live under package-local testdata.

The package command no longer passes a dedicated --target-dir. It locates
the executable in the workspace's normal Moon build tree. On macOS, the
development runtime rpath is replaced with
@executable_path/../Resources/proton/lib during bundle staging, before
signing, so development builds remain runnable while packaged applications are
relocatable.

The generated project template and existing examples now default bundle output
to dist. Repository-local example code generation still uses the codegen
module's own standard codegen/_build tree to avoid a nested Moon invocation
contending for the outer workspace lock.

Validation

  • moon fmt
  • moon info
  • CLI package tests: 162 passed
  • proton_config tests: 26 passed
  • Proton facade/bootstrap/catalog tests: 75 passed
  • moon -C examples build --target native --diagnostic-limit 100
  • moon -C e2e build --target native --diagnostic-limit 100
  • node scripts/verify_generated.mjs
  • node native/scripts/verify_link_config.mjs native/dist
  • macOS package creation, ZIP integrity, signing, bundle layout, and relative
    executable rpath verified locally

The existing final CDP launch probe in macos_package_smoke.mjs still times
out because a packaged application does not currently consume
PROTON_REMOTE_DEBUGGING_PORT; this PR does not change that debugging-port
behavior.

@Milky2018
Milky2018 marked this pull request as ready for review August 13, 2026 03:41
@justjavac
justjavac merged commit dfd1224 into main Aug 13, 2026
4 checks passed
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