refactor(build): eliminate dedicated output directories - #116
Merged
Conversation
Milky2018
marked this pull request as ready for review
August 13, 2026 03:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_buildtree for ordinary builds and package inputsdistBackground
Proton had accumulated several parallel output layouts: Moon's normal
_build,target/proton-package-build, repository-local E2E target directories, andfixed 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:
_build.dist..protonremains reserved for installed CEF/runtime state.testdata.The package command no longer passes a dedicated
--target-dir. It locatesthe executable in the workspace's normal Moon build tree. On macOS, the
development runtime rpath is replaced with
@executable_path/../Resources/proton/libduring bundle staging, beforesigning, 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 codegenmodule's own standard
codegen/_buildtree to avoid a nested Moon invocationcontending for the outer workspace lock.
Validation
moon fmtmoon infomoon -C examples build --target native --diagnostic-limit 100moon -C e2e build --target native --diagnostic-limit 100node scripts/verify_generated.mjsnode native/scripts/verify_link_config.mjs native/distexecutable rpath verified locally
The existing final CDP launch probe in
macos_package_smoke.mjsstill timesout because a packaged application does not currently consume
PROTON_REMOTE_DEBUGGING_PORT; this PR does not change that debugging-portbehavior.