Skip to content

Private dependencies leaking through public headers #34

Description

@ZakyHermawan

In the CMakeLists.txt, some dependencies (e.g., aixlog) are declared with a PRIVATE scope; however, aixlog is included directly in the service.hpp header file.

If someone uses libasyik as an external dependency and includes service.hpp, the compiler's preprocessor will try to include aixlog, but the compiler will have no idea where to find it. cppcodec probably suffers from this issue as well if someone transitively includes it when trying to include include/libasyik/internal/digestauth.hpp. This happens because cppcodec is declared as PRIVATE while the include/ directory is marked as PUBLIC (though I haven't explicitly tested this).

I encountered this bug when trying to build this project. I had to manually set the include directory for aixlog, even though I am not using it directly.

It might be a good idea to use the Pimpl here to hide these private dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions