Lightroom SDK: Deprecation warnings or errors.

  • 2
  • Idea
  • Updated 7 years ago
Please support option to issue deprecation warnings or error when LrSdkMinimumVersion is set to 3, and Lr 2 functions are called.

Likewise for future versions...

Plugin author section seems ripe for this option, but I'm easy...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes

Posted 7 years ago

  • 2
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes
Bonus Idea:
----------------
Provide a list of deprecated members in text form, so a plugin can be written to test source code for deprecation. That way, the functions would not necessarily have to be called to be found.

The dilemma:
------------------
A programmer who would prefer plugins to work with the oldest version of Lightroom possible, needs to leave deprecated functions in place, and use new methods only when necessary, and find some way to know which functions or modules are compatible with which version. But then none of those plugins will run as soon as the new version of Lightroom is released, and it's hard to find all occurrences.

Another option is to always remove all deprecated functions asap, and only support the newest version of Lightroom. Then the plugins will still work when the newest version of Lightroom is released. But you see the problem with this approach, right?

Bottom-line:
----------------
Its nigh impossible to tell whether a plugin is using deprecated features or not, or accurately determine the minimum SDK that should be specified.

Final thoughts:
-------------------
I know lua has some real nice metatable features that would make it easy to throw a deprecation error when accessing a deprecated member. If this would not be the most efficient, perhaps consider a "debug/development" mode for the SDK.

At a minimum, provide a complete list of deprecated functions in one place in the doc. Now that I think about it, a complete list of *new* functions in one place would be awesome too.