build: the rest of the runtime CMake restructure (non-combat): host units, core/update and cdn entries, the top file's test targets

Open
#2,886 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
34/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp
Domain
build-system

Research direction

Start with src/runtime/CMakeLists.txt and tools/tests/test_runtime_lifecycle_invariants.py, then compare configured compile commands with the release base as described in the issue. Move the listed host, core/update, CDN, and non-combat test target entries into their owning directory files while preserving compiled source sets. Done means the rule catches entries left in the top file and dropped entries, and the combat targets remain there.

Written by the indexing model from the issue text.

Description

enhancement

Evidence at 09c2738ca

  • src/runtime/CMakeLists.txt:48 set(PATCHES_SOURCES still lists the core/update, host, cdn and core entries. The directory files
    own the rest (the restructure commit c0b124c2b says so).
  • src/runtime/CMakeLists.txt:14 set(NEVR_HOST_UNITS lists the host units, including ../core/update/*.cpp.
  • src/runtime/CMakeLists.txt:92 add_library(nevr_runtime SHARED ${PATCHES_SOURCES} ${PATCHES_HEADERS}).
  • git show 09c2738ca:src/runtime/CMakeLists.txt | grep -c add_executable prints 124: the runtime test targets the restructure left in the
    top file.

Not shown

  • The link order of nevr_runtime.dll and nevr_host changes when the lists move (c0b124c2b changed the nevr_runtime order and did not
    check whether any code depends on it).
  • The test-map rows of the moved files: they need the build trees.
  • Whether any combat entry belongs here. It does not: this unit is non-combat only.

Falsifier

A configure of the tree after each step whose compiled source set for nevr_runtime, nevr_host or any test target differs from the
release base's compile_commands.json (keyed by output, root substituted), beyond the defines the step names.

Work

  1. Test first: a rule, in the style of registration_problems in tools/tests/test_runtime_lifecycle_invariants.py, that fails while
    PATCHES_SOURCES holds an entry a directory file owns. It fails at 09c2738ca.
  2. Move the host units into src/runtime/host/CMakeLists.txt, with the same compiled set as the base (the falsifier above).
  3. Move the core/update and cdn entries to the directories that own them, with the same falsifier.
  4. Move the top file's non-combat test targets into per-directory files; the combat targets stay.
  5. A mutant for each moved list: drop one entry, and the compiled set falls short, so the rule or the falsifier fails.
Dominant language
C++
Stars
3
Forks
5
Avg merge
4h 37m
Merged PRs (30d)
524

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.