Repository navigation
Simplify lazy dependency handling - #45
Conversation
| .name = .sdl, | ||
| .fingerprint = 0xec638ccbd103848b, | ||
| .version = "1.0.7+3.4.18", | ||
| .version = "1.0.8+3.4.18", |
There was a problem hiding this comment.
1.0.7 has no functional changes yet, so you could use it for this stuff.
There was a problem hiding this comment.
Right now the build system ignores these version numbers, but in the future we'd like to use them to make decisions in situations where multiple versions of a package are present simultaneously. However, this doesn't work if multiple PRs are merged into master without bumping the version number, since this means two users who fetch latest master could have different commits with the same version number, and the build system has no way of knowing which is newer.
My plan is to follow this pattern until we have these features nailed down (likely in the 0.18 release cycle) at which point I can reevaluate whether this pattern makes sense given how the features end up being implemented.
To save some busy work though, I don't think we need to make a new tag for each patch release. Tags are a useful way to find old releases quickly, but I don't think there are many use cases for intentionally fetching an old patch release. Most users will just want whatever is latest on master, the users looking for an old release are probably looking for a particular Zig or SDL version.
There was a problem hiding this comment.
I've been tagging when I want to pull a new version into SDL_image or SDL_ttf. (I know I could just use commit too, but it's nice when there's a tag attached.)
I do fear the upcoming package manager changes are going to create a lot of problems or busy work if every commit effectively has to have a unique version. It'd be nice if the package manager could support version templating or something when used in conjunction with version control tags. .version = "1.0.8-dev.{n}+upstream.3.4.18.git.{id}". Obviously that wouldn't work with archives, but most distributions will only be producing archives for tagged, concrete versions anyway.
There was a problem hiding this comment.
I've been tagging when I want to pull a new version into SDL_image or SDL_ttf. (I know I could just use commit too, but it's nice when there's a tag attached.)
Gotcha, that makes sense.
I do fear the upcoming package manager changes are going to create a lot of problems or busy work if every commit effectively has to have a unique version. It'd be nice if the package manager could support version templating or something when used in conjunction with version control tags. .version = "1.0.8-dev.{n}+upstream.3.4.18.git.{id}". Obviously that wouldn't work with archives, but most distributions will only be producing archives for tagged, concrete versions anyway.
I think there's still room to explore how exactly this works in the build system (just saw your comment on the respective issue.)
FWIW I don't think every commit needs a unique version--just anything that main is going to point at for a substantial amount of time. For example, there's no reason to bump the version multiple times within the same PR since on merge main will jump to the last commit. Similarly, if merging two PRs in a row, it's probably fine to do the version bump after the sequence of merges.
An alternative strategy would be to not treat main as stable, and instead tag any release that's intended to be depended on. There are definitely advantages to this, but I'm experimenting with the former approach first since it requires less clicks.
238d7f0 to
00d355a
Compare
No description provided.