You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#4299 was a compile error in an installed header (file_http_server.h) that no in-repo translation unit included, so CI never compiled it on any platform. #4306 resolved that specific case by removing the unused header, but the underlying gap remains: an installed public header that nothing in the repo includes is never compiled by CI, so a break in one only surfaces when a downstream consumer builds it (and platform-specific breaks, like a Windows-only error, are especially easy to miss).
Proposal
Add a compile-only target that #includes each installed public header and is built (not run) on Linux, macOS, and Windows, so CI fails if any installed header stops compiling standalone.
A few things I'd want input on before implementing, rather than sending a large PR cold:
Build-option conditionality: many headers are gated on options (WITH_OTLP_*, etc.), so the target would compile whatever the current build config enables, matching each CI job's flags. Does that fit the existing CI matrix, or is there a preferred shape?
Discovery: glob the installed headers at configure time, or keep an explicit list?
Build systems: cover both CMake and Bazel, or start with one?
If this is welcome I'm happy to implement it. If there's a known reason it hasn't been done (e.g. the option-conditionality makes it awkward), I'd rather hear that first.
Follow-up to #4299 / #4306.
#4299 was a compile error in an installed header (
file_http_server.h) that no in-repo translation unit included, so CI never compiled it on any platform. #4306 resolved that specific case by removing the unused header, but the underlying gap remains: an installed public header that nothing in the repo includes is never compiled by CI, so a break in one only surfaces when a downstream consumer builds it (and platform-specific breaks, like a Windows-only error, are especially easy to miss).Proposal
Add a compile-only target that
#includes each installed public header and is built (not run) on Linux, macOS, and Windows, so CI fails if any installed header stops compiling standalone.A few things I'd want input on before implementing, rather than sending a large PR cold:
ext/include/opentelemetry/ext/**(where [BUG] file_http_server.h does not compile on Windows #4299 was), or also cover the api/sdk/exporters installed headers?WITH_OTLP_*, etc.), so the target would compile whatever the current build config enables, matching each CI job's flags. Does that fit the existing CI matrix, or is there a preferred shape?If this is welcome I'm happy to implement it. If there's a known reason it hasn't been done (e.g. the option-conditionality makes it awkward), I'd rather hear that first.