opus icon indicating copy to clipboard operation
opus copied to clipboard

Version retrieval fails when used as submodule

Open Krzmbrzl opened this issue 3 years ago • 2 comments

When including Opus as a git submodule, tags don't seem to be part of the data fetched by git. Therefore the logic applied here https://github.com/xiph/opus/blob/12a356e431d1b2d3531d3d73de330bf9ee9be48b/cmake/OpusPackageVersion.cmake#L10-L12 doesn't work out and retrieving the version will fail.

Why are tags used in that way anyway? Wouldn't it be easier if the version was simply specified in the CMakeLists.txt? Then it wouldn't be necessary to include a dedicated version file in the released source trees either :eyes:

Krzmbrzl avatar Jan 09 '22 16:01 Krzmbrzl

The versioning system in Opus predates the CMake implementation. Maintainers don't want to manually go through all build descriptions and manually update them. Automake/CMake/Meson etc.

You can't go in and fetch the tags in the submodule before build?

xnorpx avatar Jan 09 '22 18:01 xnorpx

You can't go in and fetch the tags in the submodule before build?

It seems to be possible, but it's not straight-forward and it doesn't seem like it can be automated (so that users who clone our repo won't have to do it themselves (explicitly)).

And if instead of using the tag which all build systems have to parse, there was simply a text-file containing the version? I see that that's what is done for the released source archives, so it seems like every supported build system should be capable of reading such a file. How about making that the default? That way you only have to update and maintain a single file (instead of one per build system) and the problem would still be fixed.

Krzmbrzl avatar Jan 09 '22 18:01 Krzmbrzl