Define version compatibility system for plugins (1 Viewer)

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Greece Greece
    Country flag
    I think you misunderstood how the compatibility system works. When you specify what version of MP your plugin is designed for, you are not saying that it is not compatible with any other future version. Also the designedForVersion is always considered in context along with all UsesSubsystem attributes you specify. I think a couple of examples will clear this out:

    Case 1:
    A plugin that is reorganizing the pictures database and does some background automation is being developed and built against SVN 27700. It has:
    Code:
    CompatibleVersion("1.1.6.27700", "1.1.6.27644")
    UsesSubsystem("MP.DB.Pictures")
    Now some time later we release Beta with a version number of 1.1.7.0 and no breaking changes in Pictures database schema or business layer. This means that the last breaking version no for the MP.DB.Pictures subsystem is still 1.1.6.27644 and as a result the plugin is compatible.

    When later on we release RC1 with version 1.1.8.0 and ofc MP.DB.Pictures subsystem last breaking version still 1.1.6.2764, so plugin still compatible. Then we finally release 1.2.0 with version 1.2.0.0 and the plugin is still compatible
    ....
    After many years and many changes to the Pictures plugin but no breaking changes to the Pictures database we are about to release MP version 1.99.0. The last breaking version of MP.DB.Pictures subsystem is still 1.1.6.27644 and the plugin is still compatible!

    All this time the plugin developer never had to change a single line of code. He didn't even have to rebuild the plugin against newer MP binaries.

    Case 2:
    We have already released 1.2.0 Beta (version=1.1.7.0).
    A window plugin that connects to social network X and presents the user the latest events, is being developed and developer is using 1.2.0 Beta to build against (although there are more changes in SVN after the release of 1.2.0 Beta). It has:
    Code:
    CompatibleVersion("1.1.7.0", "1.1.6.27644")
    UsesSubsystem("MP.SkinEngine.Core")
    UsesSubsystem("MP.SkinEngine.Dialogs")
    UsesSubsystem("MP.Config")
    Some time later we release 1.2.0 final (version=1.2.0.0) and no breaking changes since Beta, so all three subsystems have a last breaking version = 1.1.6.27644. The plugin is ofc compatible as expected.

    Later on we find a serious bug (a memory leak). The only possible fix is to change so that we require all GUIWindow descendants to implement a new interface INewInterface that will handle resource allocation/deallocation. Unfortunately this change will break all plugins that define GUIWindow descendant classes (i.e. all window plugins) but we have no choice. So we commit this change in SVN 28905 and set MP.SkinEngine.Core last breaking version to 1.2.0.28905. Then a few commits later we release 1.2.1 as a bugfix release with version 1.2.1.0.

    Now this time the plugin is no longer compatible because it uses MP.SkinEngine.Core which has a breaking change after the version the plugin was designed for.

    The plugin developer has to implement the new interface in his GUIWindow derived class and then rebuild the plugin. He has to do this anyway for the plugin to work (and also not leak resources). He builds against 1.2.0.28949 (SVN 28949) which is a private SVN build that is being tested by the team (and available to community plugin devs). Because of the compatibility system he has to also change the CompatibleVersion to:
    Code:
    CompatibleVersion("1.2.0.28949", "1.2.0.28905")
    That is the only additional change he has to make to make his plugin compatible with 1.2.1.
    *Notice that the plugin developer has to make changes and rebuild the plugin regardless of the compatibility system.

    Now we find a couple minor issues that we fix in SVN 28950 and 28951 and in the end 28951 is the final 1.2.1 which is release with a version 1.2.1.0 and ofc the newly built (against 1.2.0.28949) plugin is compatible with 1.2.1 as expected.


    An additional point I would like to make is that it is expected that there will be no breaking changes once we reach the RC phase, so what is compatible with x.x.x RC1 should be compatible with x.x.x final. If we do decide to make a breaking change at this stage, rest assured that we will not do it lighthearted, and we will make sure we communicate this to all known plugin developers in advance so that they have time to do necessary changes to their plugins.

    I hope this clears things out.
     

    Disore

    Portal Pro
    February 27, 2009
    72
    16
    Sweden Sweden
    Hi arion_p,

    thank you very much for your detailed answer. I totally misunderstood the designedForVersion argument, thank you for clearing that out!

    Note to myself: make sure you understand the problem before spending other peoples time; and your own; ranting about non-issues :oops:
     

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    United States of America United States of America
    Light dawns on marble head! So the bottom line is the MP developers are going to track version compatibility by subsystem, and not by the Core.dll assembly itself? At least that's what I got out of your detailed explanation (awesome BTW). In that case I think it will be ok, as long as you document the current list of subsystems and their versions.

    Also, you might want to add the above detailed example to the "Version Compatibility" Wiki page:

    Version Compatibility
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Note to myself: make sure you understand the problem before spending other peoples time; and your own; ranting about non-issues :oops:
    Actually I think it was good that you brought those questions up. Definitely we didn't have good enough documentation in the wiki - now we can add those two good arion's examples to the documentation, I think it will help the other plugin developers a lot.

    Also, you might want to add the above detailed example to the "Version Compatibility" Wiki page:
    Yes, that should be added to there.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    CyberSimian DEFINE tags in "References.xml" no longer work MediaPortal 1 2
    azzuro [fixed] 5011: Version label in Splash screen - pos, size from skin MediaPortal 1 61
    caveman [solved] Cannot download new version My TVSeries 5
    ajs [Help Us!] MP1 X64 Version MediaPortal 1 20
    RoChess Splashscreen MePo version Titan Skin Feedback 8
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    D How to switch versions of Schedules Direct Newcomers Forum 2
    D I just installed MP 1.23. Which version of Schedules Direct should I use, where do I obtain it from Newcomers Forum 6
    Z TV-Service in falscher Version Installationsprobleme? 9
    T Neue Treiber Version 3 für TV-Karte Digital Devices Cine C/C2/T/T2 V7 TV / Streaming 6
    M Version numbers MediaPortal 1 Talk 7
    framug LAVFilter 0.74.1 incorrect version Skins and Plugins Installer (MPEI) 8
    A Problem Windows 10 64 bit prof. Update auf Version 1903(gelöst) Installationsprobleme? 0
    T No TV after updating Windows 10 to latest Version 1903 / OS build 18362.175 (logs attached) General Support 2
    T Issues with MediaPortal not starting correctly using versions after 1.20 Final General Support 6
    N [Question] How come when I build WIP_2.2.1 the logged version number is 2.1.1711.10774? MediaPortal 2 1
    Lehmden MP2 client for Windows 10 ARM, possible? Maybe an UWP version could do the trick... MediaPortal 2 11
    Symphy Version 0.2.8.5 for MP 1.21 ASIO music player 17
    doskabouter [Question] Versions of subsystems MediaPortal 1 2
    G Best version of mp so far General 4
    T Cross reference version documents General 1
    M.Hulot Moving pictures startet nur im hintergrund und falscher version Allgemeines Supportforum 5
    J Things I noticed with MP2.2 almost within minutes after upgrading it over the 2.13 version General 6
    J New .NET version? General Development (no feature request here!) 0
    hounddog How to get My Films working in MP 1.20 My Films 5
    Similar threads

























    Top Bottom