Skip to content

[CMake] Strengthen pkg-config installation tests to detect missing metadata and dependencies #4697

Open

Description

@lalitb

The pkg-config tests added in #4528 request all installed modules together. This can hide missing dependency declarations because another requested module supplies the dependency.

The tests also select coverage based on which .pc files exist. If an expected component’s metadata is missing, its tests can be skipped instead of reporting an incomplete installation.

Please test public packages independently and check that expected .pc files are present for the enabled components. These are coverage gaps, rather than confirmed defects in the currently installed packages.

cc @shashankxrm

Activity

  1. added
    needs-triage
    on Oct 12, 2026
  2. shashankxrm commented on Oct 13, 2026

    @shashankxrm
    Contributor

    Thanks for opening this, @lalitb.

    Both gaps confirmed on main:

    • All modules resolve through a single pkg_check_modules(), so a missing Requires gets masked. A quick repro with an emptied Requires in exporter_ostream_span.pc confirms it.
    • A missing .pc is only a STATUS skip, not a failure.

    Likely under-declarations the current test can't see:

    • exporter_otlp_builder_utils → configuration_core
    • exporter_otlp_grpc_client → otlp_common / proto_grpc

    Plan:

    • A per-component manifest of expected .pc files: fail if any is missing, with an explicit allowlist for components that ship none.
    • Resolve each module on its own.
    • One test executable per component, linked against only its own modules (shared and static, CMake 3.16 compatible).

    Questions before I open a PR:

    1. Should internal modules (proto, otlp_recordable, *_client, …) also resolve standalone, or only via the public exporters?
    2. OK to land the tests first, then fix whatever they catch in the same or a follow-up PR?
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

    needs-triage

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions