Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Support comma-delimited Interface versions in TOC files #531

Closed Meorawr closed 3 months ago

Meorawr commented 4 months ago

This is a feature request to extend the "Interface" TOC field to allow addons to declare themselves as compatible with multiple interface versions - potentially from the same client flavor - by adding support for comma-delimited interface version numbers.

Proposal

The following TOC file would declare an addon that is compatible with versions 1.15.1 (11501), 3.4.1 (30401), 4.4.0 (40400), 10.2.5 (100205) and 10.2.6 (100206) of the game.

## Interface: 11501, 30401, 40400, 100205, 100206

The expectation is that if any version specified is an exact match for the client interface version, the addon should show as in-date and be loadable. Otherwise, the addon should be flagged as out of date if no values match.

Considerations

What benefits does this bring?

Allowing addons to declare themselves as compatible with multiple versions of the same client flavour primarily assists with releasing an addon that supports multiple client flavours, and with addon updates around the time of client patches.

While each client supports a unique TOC suffix (eg. "_Mainline.toc"), in practice many addons don't actually write and maintain three separate TOC files for each client - we automatically generate them from a single master TOC file. Further, the only difference often ends up only being the Interface version number. It'd be nice to remove this generation step and just have one TOC file that can be loaded on all clients and is compatible with multiple listed versions.

An additional note to make is that with the initial build of the Cataclysm Classic beta, the "_Classic.toc" file suffix has seemingly been altered to now load in any Classic client flavor. This isn't usable in practice by addon developers, as we can't specify multiple interface versions in this singular file.

Finally, during PTR cycles authors often make compatibility changes within their addons in a manner that ensures they work with both the upcoming client version alongside the currently released client version simultaneously. What we lack, however, is a way to signal this compatibility; the addon is either forced to show as out-of-date on the PTR or on the live client.

Why a comma-delimited field?

Precedent. Other fields such as SavedVariables already support comma delimitation, and it looks fairly natural. There's also no compatibility risk as this is a purely additive feature.

Meorawr commented 3 months ago

Implemented into the Cataclysm Classic beta as of build 4.4.0.53750. Presumably will have missed the boat for 10.2.6, but will test there when that patch arrives.