pboettch / json-schema-validator

JSON schema validator for JSON for Modern C++
Other
464 stars 133 forks source link

Sofile name has changed #270

Closed EGuesnet closed 11 months ago

EGuesnet commented 11 months ago

Hi, On release 2.2.0, or up to yesterday on main, the lib was released on Linux as libnlohmann_json_schema_validator.so . Probably due to PR #262, the name is now libnlohmann_json_validator.so (without schema). Is this voluntary, or a mistake? Thanks.

EGuesnet commented 11 months ago

Some details:

On https://github.com/pboettch/json-schema-validator/blob/main/CMakeLists.txt#L140,

set_target_properties(nlohmann_json_schema_validator PROPERTIES
        VERSION ${PROJECT_VERSION}
        SOVERSION ${PROJECT_VERSION_MAJOR}
        EXPORT_NAME validator
        OUTPUT_NAME nlohmann_json_validator       <---------
        )

Was before the PR,

set_target_properties(nlohmann_json_schema_validator
                      PROPERTIES
                          VERSION ${PROJECT_VERSION}
                          SOVERSION 2)
LecrisUT commented 11 months ago

Oh yes, should have made a discussion issue. Is it breaking any api downstream? If the package is imported via FetchContent or any package manager it should not matter. I think the whole naming convention should be simplified in a later version

EGuesnet commented 11 months ago

Thanks for your response. I will change our build in order to import correctly the lib with the new name.

LecrisUT commented 11 months ago

Uhm, we just changed it back, but please tell us what is your build method? I want to do a naming simplification in #272 and it will be helpful to know what are the current downstream workflow to keep things compatible for a while.

EGuesnet commented 11 months ago

Our build method is

cmake \
    -DBUILD_SHARED_LIBS=ON \
    .. \
    && make \
    && make install

It is done a build container, we next get libs created, and compile our software with cmake, and a CMakeLists.txt with

target_link_libraries(ourLib PUBLIC
    [...]
    nlohmann_json_validator
)
LecrisUT commented 11 months ago

It is done a build container, we next get libs created, and compile our software with cmake, and a CMakeLists.txt with

target_link_libraries(ourLib PUBLIC
    [...]
    nlohmann_json_validator
)

Ok, so it is a cmake workflow. It should be independent of the actual library name in that case. Note the few changes in the cmake options recently introduced though.