Skip to content

emit build-database for IDEs: one failing member loses the whole database, and build programs cannot tell a plan pass #699

Description

@Sunrisepeak

mcpp-language-server gets a project's model from mcpp emit build-database --format json. Reproducing Sunrisepeak/mcpp-language-server#23 on a real 5-member Windows workspace (GalTranslPP: vcpkg + Qt 6, mcpp 2026.9.25.1, windows-2025) showed two properties of emit that cost the editor its model. Both are behaviour the spec states today, so this is a request, not a bug report. Tracked on our side as UP-M2 / UP-M3 in Sunrisepeak/mcpp-language-server#24.

1. One member's failure loses every set (SPEC-005 R5.2)

  • GPPGUI's build program calls mcpp::dep_bin("gpp.updater", "Updater"). Building that host tool ran its own lupdate check action, which failed on that machine (lupdate.exe could not load Qt6Qml.dll).
  • Result: MCPP_BUILD_DATABASE_PLAN_FAILED: GPPGUI: building host tool 'updater:Updater' failed, and no data — the four members that planned fine got no database either.
  • Effect: the language server falls back to a guessed model for the whole workspace (a toolchain it found, no include directories); clangd then crashed repeatedly on it.

Ask: when some members plan and others fail, return data with the sets that planned, plus an error diagnostic per failed member, under a code a consumer can tell apart from a total failure (e.g. MCPP_BUILD_DATABASE_PARTIAL).

2. A build program cannot tell it is running for a plan (SPEC-005 R2.5)

  • emit runs build.mcpp exactly as build does and builds dependencies' host tools, with no signal in the MCPP_* contract.
  • A build program that checks the full environment (a Qt root, a vcpkg .lib per library) — or a host tool whose build runs project checks, as above — fails emit on every machine that cannot build yet. That is exactly when an editor most needs the model.
  • mcpp::action edges already do not run under emit (R2.2); the problem is work done in the program itself and in host-tool builds.

Ask (any of):

  • a documented signal, e.g. MCPP_PLAN_ONLY=1 / mcpp::plan_only(), so a program can skip checks and heavy work while planning;
  • under emit, a build-program failure becomes a diagnostic for that member instead of failing the command (pairs with 1);
  • under emit, do not run the check actions a host-tool build declares.

Evidence

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions