jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.77k forks source link

Release file name 0.8.0 breaks naming convention #1262

Closed HFTrader closed 5 months ago

HFTrader commented 5 months ago

I have a script that sources yaml-cpp-${VERSION}.tar.gz but now version 0.8.0 is named only 0.8.0.tar.gz. Is that intended? Can this be rolled back by any chance?

jbeder commented 5 months ago

I forget why I did that, but I think someone suggested it was redundant to have the yaml-cpp. Anyways you probably can just update your script?

HFTrader commented 5 months ago

Sure I can do that. However yours is the only sore thumb in a list of +50 other github repos that does not follow the convention.

jbeder commented 5 months ago

Oh, interesting. I there some github documentation to suggest what to do here? I can't seem to find the issue where someone complained in the other direction...

jbeder commented 5 months ago

Ah, I found it: https://github.com/jbeder/yaml-cpp/issues/1204#issue-1817047122

BTW it would be good to change tagging convention from yaml-cpp-\ to just \ because autogenerated from git tag tar ball automatically forms archive with base directory \-.

jbeder commented 5 months ago

Interesting. It names the URL 0.8.0.tar.gz but when you click to download it, it saves it as yaml-cpp-0.8.0.tar.gz.

How are you downloading it?

HFTrader commented 5 months ago

The usual way to automate it is to download with tools like curl or wget as in

$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz

$ ls -l
-rw-rw-r-- 1 user user 43367689 Oct 12  2019 binutils-2.33.1.tar.gz

$ tar taf binutils-2.33.1.tar.gz | head
binutils-2.33.1/setup.com
binutils-2.33.1/zlib/inffast.h
binutils-2.33.1/zlib/ChangeLog.jit
binutils-2.33.1/zlib/trees.h
binutils-2.33.1/zlib/doc/rfc1951.txt
binutils-2.33.1/zlib/doc/algorithm.txt
binutils-2.33.1/zlib/doc/rfc1950.txt

All the GNU ecosystem and most commercial/OSS Github packages do that name+version convention.

When you run on yaml-cpp, it produces

$ wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz

$ ls -l 
-rw-rw-r-- 1 user user  1017151 Jan 17 11:49 0.8.0.tar.gz

$ tar taf 0.8.0.tar.gz | head
yaml-cpp-0.8.0/
yaml-cpp-0.8.0/.clang-format
yaml-cpp-0.8.0/.codedocs
yaml-cpp-0.8.0/.github/

Like cmake saves as cmake-v3.23.1.tar.gz (with a "v" before the version) but the untarred directoriy follows the same pattern.

$ tar taf cmake-v3.28.0.tar.gz | head
cmake-v3.28.0/
cmake-v3.28.0/.clang-format
cmake-v3.28.0/.clang-tidy
cmake-v3.28.0/Auxiliary/
cmake-v3.28.0/Auxiliary/CMakeLists.txt
cmake-v3.28.0/Auxiliary/bash-completion/

More important than the convention per se, it is to follow a pattern historically. If you break the name convention in the middle, all the tools (eg Conan) will have to have ifs to cope with that breakage. Comparing versions is a mess.