On Fri, 02 May 2014 10:08:38 GMT, Sönke Ludwig wrote:

If proper SemVer versions are used, there is no problem. This will mean that there is not necessarily a one-to-one correspondence between the original version digits and those of the binding, but it will naturally support bugfix releases for the original library, as well as for the binding. The "build metadata" part of the version can be used to denote the exact SDL version the binding is based on (will be ignored when comparing versions). Example:

SDL 2.0.1            => DerelictSDL 1.0.0+sdl-2.0.1
SDL 2.0.1 + bugfix 1 => DerelictSDL 1.0.1+sdl-2.0.1
SDL 2.0.1 + bugfix 2 => DerelictSDL 1.0.2+sdl-2.0.1
SDL 2.0.2            => DerelictSDL 1.0.3+sdl-2.0.2 (assuming SDL 2.0.2 contains only bugfixes and is fully API/ABI compatible)
SDL 2.0.3            => DerelictSDL 1.1.0+sdl-2.0.3 (assuming SDL 2.0.3 contains only backwards compatible changes)
SDL 2.1.0            => DerelictSDL 2.0.0+sdl-2.1.0 (breaking changes, could be maintained in parallel on a separate "2.1.x" branch)

Instead of choosing a branch, the user of the library then uses "derelict-sdl": "~>1.0.0" or "derelict-sdl": "~>1.0" to get only bug fix or backwards compatible releases. The good thing then is also that people can do "derelict-sdl": "1.0.2" or "derelict-sdl": ">=1.0.0 <=1.0.2", should there be any unintended breaking changes in 1.0.3.

My problem is that SDL 2.0.1 adds new functions and 2.0.2 adds new functions. Derelict loads functions dynamically, so if anyone is using a version of Derelict implemented against 2.0.2, then they will get exceptions when trying to load earlier versions of SDL. That means that if I tag Derelict bug fixes on the same branch, anyone requiring older versions of SDL will not be able to take advantage of it (unless they use Derelict's selective loading mechanism, but that can really get out of hand and was not intended for this sort of thing).

But this bit "breaking changes, could be maintained in parallel on a separate '2.1.x' branch" has me curious. Are you saying that dub can pick up tags across multiple branches? Given the existing 2.0.0 and 2.0.1 branches, let's say I start tagging the former with 1.x.x and the latter with 2.x.x. Will dub pick up all the 1.x and 2.x tags?