Skip to content

fix(build): a bare "core" in .gitignore ate the core/ source tree - #42

Merged
srpatcha merged 2 commits into
masterfrom
fix/gitignore-eating-core-tree
Sep 1, 2026
Merged

fix(build): a bare "core" in .gitignore ate the core/ source tree#42
srpatcha merged 2 commits into
masterfrom
fix/gitignore-eating-core-tree

Conversation

@srpatcha

Copy link
Copy Markdown
Member

master does not build. From a fresh git clone --depth 1:

48 fatal errors
apps/epdf/epdf.h:5:10: fatal error: eapps_core.h: No such file or directory

Every one of the 44 app targets includes eapps_core.h, and it is not in the
repository:

$ git ls-files | grep -c eapps_core.h
0

Cause

.gitignore:61

core

A bare core matches any file or directory named core, at any depth — so
it matched core/, the source tree. The rule was clearly meant for Unix core
dumps; it silently excluded the shared headers instead.

Only the 42 files under core/ that predate the rule are tracked. Everything
added since is invisible: git status shows nothing, git add does nothing
without -f, and the developer who wrote eapps_core.h had a working build
locally while master had none.

This is the second instance of this trap in the organisation. ebuild's build/
rule matched ebuild/build/, its backend package, so a new module added there
was silently untracked — caught there before it cost anything, because nothing
had been added yet. Here it had already been paid.

The change

The rule now names what it was for:

# Core dumps. A bare "core" rule silently ignored the entire core/ source
# tree, which is why core/common/include/eapps_core.h - included by all 44
# app targets - was never committed and every app failed to build.
core.[0-9]*
vgcore.*

plus core/common/include/eapps_core.h itself, and repairs to the last four app
targets that had drifted while nobody could build them.

Verified

Both directions of the ignore rule, because loosening it must not stop it doing
its job:

core.12345    .gitignore:64:core.[0-9]*    still ignored
vgcore.999    .gitignore:66:vgcore.*       still ignored

core/common/include/eapps_core.h            no longer ignored, now tracked

Build from a clean tree:

0 fatal errors
0 build errors
53 static libraries produced

Note for the open Dependabot PRs

#38, #39, #40 and #41 all show failing CI. That is this, not the action bumps —
their runs fail with the same eapps_core.h: No such file or directory. All four
target versions do exist and are current (actions/checkout v7.0.1,
actions/setup-java v6.0.0, pnpm/action-setup v6.0.10,
mymindstorm/setup-emsdk v16), so once this lands their CI should be judged
again on its own merits.

claude added 2 commits August 30, 2026 22:01
Root cause: .gitignore line 61 was a bare `core` rule - intended for core dumps,
but it matches the core/ source directory. Any new file under core/ was silently
dropped by `git add`. That is how core/common/include/eapps_core.h went missing:
it is included by 46 files across apps/ and exists in no commit in this
repository's history, so all 44 app targets failed at the first #include:

  apps/ecal/ecal.h:5:10: fatal error: eapps_core.h: No such file or directory

The 42 files already under core/ are tracked (added before the rule bit), which
is why the breakage looked like a missing include path rather than a missing file.

Two changes:

1. `core` -> `core.[0-9]*` + `vgcore.*`, so core dumps are still ignored and the
   source tree is not. Without this the header below cannot be committed at all.

2. core/common/include/eapps_core.h - an umbrella header. Nothing is invented;
   every symbol the apps use was already declared elsewhere:

     eapps_app_info_t, eapps_app_lifecycle_t    <- eapps/types.h
     eapps_registry_*                           <- eapps/registry.h
     eapps_palette_t, eapps_theme_get_palette   <- eapps/theme.h
     eapps_scaffold_create, eapps_card_create,
     eapps_list_create, eapps_list_item_create  <- eapps/widgets.h

Verified with `ninja -k 0` on a clean configure: failing app targets went from
44/44 to 4/44. The remaining four are unrelated pre-existing defects, NOT fixed
here - each needs a decision about intended types:

  ebot     unknown type name 'ebot_state_t'
  eremote  'MAX_DEVICES' undeclared; 'eremote_device_t' lacks 'volume'/'channel'
  etrack   'LV_SYMBOL_SHOPPING_CART', 'lv_font_montserrat_12' undeclared
  ewifi    unknown type name 'ewifi_risk_level_t'; 'lv_font_montserrat_12' undeclared

etrack and ewifi are LVGL configuration (fonts/symbols not enabled in
extern/lv_conf.h), not application logic.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Verified: ninja exits 0, 0 FAILED, and all 44 add_subdirectory'd app targets
produce objects. Was 4 failing after the eapps_core.h fix (44 before it).

Two apps were TWO IMPLEMENTATIONS CONCATENATED, which produced the "duplicate
symbol" and "missing member" errors:

  etrack.c   A complete package-tracking app (lines 1-85: carriers, list view,
             add view, full lifecycle) with an unrelated placeholder stub
             appended after it - its own #include "etrack.h", its own
             etrack_ctx_t, and duplicate etrack_init/deinit/info/lifecycle. The
             stub shared no symbols with the real app. Removed the stub.

  eremote.c  Worse: the stub was pasted OVER THE TAIL of the real
             eremote_init(), which lost its closing `return true; }` - the
             function simply stopped after build_nav_bar(body). Restored the
             ending, removed the duplicate init and ctx, kept the appended
             lifecycle block because the real implementation defined none. Its
             ebot_info metadata described a different app ("Remote desktop
             client", EAPPS_CAT_NETWORK); corrected to the IR/WiFi remote this
             actually is.

Two invented LVGL identifiers. LVGL defines 62 LV_SYMBOL_* and neither of these
is among them:

  LV_SYMBOL_SHOPPING_CART   apps/etrack -> LV_SYMBOL_LIST
  LV_SYMBOL_DEGREE_SIGN     apps/eremote -> "%d C" (the built-in montserrat
                            faces have no degree glyph, so a literal would have
                            rendered as a placeholder box)

Also enabled LV_FONT_MONTSERRAT_12 in extern/lv_conf.h: etrack and ewifi both
use it and it was not among the enabled sizes.

ewifi:
  - `strlen(creds[i].security)` and `"%s"` on it - .security is an
    ewifi_security_t ENUM, so this was pointer-from-integer. ewifi_security_str()
    is the accessor and is already used correctly at :147.
  - Its appended lifecycle block referenced an undefined `ctx`; the
    ewifi_ctx_t/ctx definition had been lost. Restored from its uses.
    FLAGGED IN A COMMENT, not fixed: that lifecycle is still a placeholder that
    draws a title, status line and button and never calls the real UI in the same
    file (build_scan_tab, build_channel_tab, build_security_tab,
    build_passwords_tab, build_nav). Wiring it up is a product decision about tab
    scaffolding, not a build fix.

eremote.h: added MAX_DEVICES (following the existing MAX_LEARNED/MAX_SCENES
pattern) and the device-state fields the real implementation sets - power_on,
volume, channel, temperature, fan_speed.

ebot.h: the header declared only the two eapps_* lifecycle symbols while ebot.c
used 17 undefined identifiers - the same failure mode as the missing
eapps_core.h. Recovered the type layer. Every struct field and width is derived
from ebot.c and the derivation is cited per-field in the header, e.g.
host[256] from `strncpy(state->host, ..., 255)`, models[].tier[16] from
`strncpy(..., 15); tier[15] = 0`. The five CAPACITIES (EBOT_MAX_MESSAGES,
_MSG_LEN, _MAX_MODELS, _MAX_TOOLS, _RESPONSE_BUF) are marked in the header as
choices, because nothing in ebot.c pins them; only EBOT_MAX_MESSAGES has
structural meaning, as the message ring shifts by one at :113-117.

Note on verification: an intermediate run of this work reported "0 failing"
because the CMake configure had failed on the LVGL FetchContent step and ninja
produced no output at all - not because everything built. The numbers above come
from a build tree with LVGL already populated, cross-checked by counting object
files per app target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@srpatcha
srpatcha merged commit 84079d0 into master Sep 1, 2026
10 of 12 checks passed
@srpatcha
srpatcha deleted the fix/gitignore-eating-core-tree branch September 1, 2026 11:09
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