build: seed from the build checkout, one shared ccache, per-build record, discovered CMake sources (b22)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, cpp, docker
- Domain
- build-system, tooling
Research direction
Start with the numbered work items in the issue, then read tools/worktree-setup.sh, tools/seed_build_tree.py, and tools/internal/buildgate to understand the current setup, seeding, and build records. Use the cited build logs and CMake source map as baselines. Done means the six listed changes are implemented and the build record, cache behavior, seed refusal, and source discovery are verified with the issue’s evidence.
Written by the indexing model from the issue text.
Description
Evidence at d082ef2e3
Each figure names the command or the read that gave it.
git rev-list --count e7d38d1e3..d082ef2e3is 390 (ran). The main checkout's build tree was configured ate7d38d1e3:
build/mingw-release/build.ninjaof the main checkout names that commit (rangrep -l e7d38d1e3).git diff --name-only e7d38d1e3 d082ef2e3 -- '*.cpp' '*.h' | wc -lis 839 (ran).- A fresh worktree at
cca701054was refused its seed.cca701054does not contain the seeder's spelling fix4b8add1be
(git merge-base --is-ancestor 4b8add1be cca701054exits 1). The seeder's documented exit status is 0 fornot-seeded
(git show cca701054:tools/seed_build_tree.py, line 47), so the setup did not stop. That worktree's build log holds 615
compiled objects: 608Building CXX objectlines and 7Building C objectlines (rangrep -c). - A fresh worktree at
e1af72182, seeded from the build checkout, built once. Its gate record readsedges_run12,
objects_compiled4,ccache_hits0,ccache_misses4. The four objects aresrc/core/build_identity.cpp,
src/runtime/host/host_identity.cpp,src/runtime/lifecycle/initialize.cppandsrc/runtime/compat/ws_bridge.cpp(the
build log'sBuilding CXX objectlines). - At
d082ef2e3the gate's end record carriesduration_sas a whole number (DurationS int,
tools/internal/buildgate/buildgate.go, read withgit show).git grepforobjects_compiled,ccache_hitsand
ccache_missesundertools/internal/buildgatefinds nothing at that commit, so the record has no compile or cache counts. src/runtime/CMakeLists.txtatd082ef2e3lists the runtime's sources in two sets,PATCHES_SOURCES(line 48) and
PATCHES_HEADERS(line 313). A probe source added with no edit to those sets was absent from the target-to-source map of
the configured tree: 0 of 1,576 linked-output rows (cmake_sources_map.py). With the directory's glob in place the same
probe had 2 rows.
Not shown
- The objects a seeded worktree compiles for any base other than
e1af72182. That is the one base measured. - The cache counts of the
cca701054build. Its gate record was not located, so no cache count is claimed for it. - Whether ccache entries are shared by two worktrees with different paths. One experiment gave a hit for one name and a
miss for the other; the cause was not isolated. - Whether the map is identical after every directory's glob. This issue does not re-measure it.
Falsifier
The cost claim is wrong if, at d082ef2e3's setup, a fresh worktree's first build seeded from the build checkout compiles no
more objects than the sources that differ from the build checkout's commit and their dependents. The seed would then already
work, and the work below would not be needed.
Work
tools/worktree-setup.shandtools/seed_build_tree.py: the seed and every fill read the build checkout and no other
source. A refused seed stops the setup with exit 1 and a logged reason.- One shared ccache for every gated build: the gate sets
CCACHE_DIRfor a command that names none (tools/internal/buildgate),
tools/ccache_config.shwritesbase_dir, andtools/ccache.confsetsmax_sizeto 60G. - One build record per gated command in
<work root>/logs/slot-build.jsonl, withduration_ms,edges_run,
objects_compiled,ccache_hitsandccache_misses. tools/cmd/new-worktreetakes-base <rev>, and a local base needs no fetch.- Each runtime directory's
CMakeLists.txtglobs its own sources intonevr_runtime(patch, lifecycle, server, ext, hook,
log, content, combat, frame, cargo, compat), and the top file adds oneadd_subdirectoryper directory.
tools/verify_patch_source_inventory.pyis removed with its references. Later units:src/runtime/host,src/cdn,
src/core, the runtime test targets and the combat bindings call. - The
go-toolsrecipe skips its build when the hash oftools/**/*.go,go.modandgo.summatches its stamp.
Related
#649 (a shared, capped ccache across worktrees), #1936 (a second worktree does not reuse the shared cache) and #975 (the seeder
and a tree built at another commit) cover parts of this. None is closed by this issue's work; each is left open until its own
evidence lands.
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 37m
- Merged PRs (30d)
- 524
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EchoTools/nevr-runtime
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
EchoTools/nevr-runtime#2910 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EchoTools/nevr-runtime#2909 ·
Maintainers usually reply within 1 day
-
build: the generated defaults header is written 0600, so a seat outside nevr-build cannot read itOpenbacklog
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EchoTools/nevr-runtime#2901 · 1 comment ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2897 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day
-
good first issue help wanted phase:0 priority:P3 type:task
Difficulty 2/5 1-3 hours Newbie friendliness 67/100