Opened 5 years ago

Closed 5 years ago

#14551 closed patch (patch_rejected)

API 3.0.0: PURPLE_VERSION_CHECK(2,x,0) returns FALSE

Reported by: stefanb Owned by:
Milestone: Component: libpurple
Version: Keywords:
Cc:

Description

Code that uses e.g.

#if PURPLE_VERSION_CHECK(2,8,0) ... #endif

to include code that should only be compiled in when libpurple API >= 2.8.0 will fail with 3.0.0, because the macro returns false.

The macro in version.h should be changed to read:

#define PURPLE_VERSION_CHECK(x,y,z) (((x) < PURPLE_MAJOR_VERSION)
<...the old definition> )

Change History (3)

comment:1 Changed 5 years ago by stefanb

Judging from the answer for ticket #14550, this seems to be intentionally.

This means the plugin binary incompatibility between different libpurple major versions is also extended to a plugin source code incompatibility. I.e. plugin authors have to rework code following the rules :-(

comment:2 Changed 5 years ago by deryni

  • Status changed from new to pending

The API versioning scheme was created largely *for* plugin authors. That is so that they can know when they do and don't need to update their code and to know for what versions built binaries will function.

I'm of two minds about this specific request though as, given the major version incompatibility, the choices here seem to me to be "have the compiler (potentially) complain about things that broke only in code older than the checked version or have the compiler (potentially) complain about things broken in code newer as well and given that the plugin author is going to need to update their code for the new version at least a little forcing the removal of (now outdated) checks like that seems unproblematic. (Though I do see difficult with maintaining a plugin for multiple versions of 2.x.x and 3.x.x at the same time that this may potentially cause.)

comment:3 Changed 5 years ago by rekkanoryo

  • Milestone 2.10.1 deleted
  • Resolution set to patch_rejected
  • Status changed from pending to closed

I'm going to reject this patch because I think the behavior is correct, given how much we change with each major version.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!