microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
780 stars 617 forks source link

[Function Request] EmailItem Table - GetBodyText > GetBodyTextFromMemory (OnPrem) #6316

Closed fvet closed 4 years ago

fvet commented 4 years ago

Trying to remove any remaining CodeCop warning. Following #5003 ...

[Obsolete('Function scope will be changed to OnPrem')]
    procedure GetBodyText() Value: Text

AL0432 warning

Method 'GetBodyText' is marked for removal. Reason: Function scope will be changed to OnPrem.

Since my extension targets OnPrem only (app.json) this warning seems redundant (I can't disable an individual warning and need to get rid of any warning for my build pipelines to work )...

Wouldn't it be better to simply move / copy the entire GetBodyText procedure / content (including existing Publishers) to a new OnPrem GetBodyTextFromMemory function instead and replace with

[Obsolete('Function not supported in SaaS. Use GetBodyTextFromMemory if you target OnPrem only')]
    procedure GetBodyText() Value: Text
JesperSchulz commented 4 years ago

You've got a very valid point here. Changing the scope of a function isn't really a deprecation - it's a partial deprecation. In your case, the warning makes no sense. We should try to find a better way to notify the developers - your suggestion would do the trick, but would require unnecessary code churn from you, which also wouldn't be perfect. We are working on mechanisms to suppress/remove warnings, which do not apply to you. The situation will improve soon :-) But thanks for letting us know! It's good to know, that what we're working on will be useful!

bc-ghost commented 4 years ago

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.