Edit

AppSourceCop Warning AS0149

Adding or removing a required method on an interface may break dependent extensions at runtime.

Description

Making a method required or removing an obsolete method from a published interface changes the interface's runtime identifier. Dependent extensions will not break at compile time but may break at runtime until they are recompiled.

Remarks

This warning is raised when a change to an interface modifies the set of required (non-default) methods, which changes the interface's runtime identifier. Scenarios that trigger this rule include:

  • A RequiredPending method becomes required (body removed)
  • A required method becomes optional (body added, making it a default method)
  • A required method is deleted

The runtime identifier determines binary compatibility between the interface and its implementors at deployment. When the identifier changes, dependent extensions continue to compile but may fail at runtime until they're recompiled against the updated interface.

Note

When AS0066 or AS0148 also fires on the same interface, this warning is suppressed because the error is more actionable.

How to fix this diagnostic?

This warning is informational; it alerts you that a runtime identifier change has occurred. Consider the following:

  • If the change is intentional (for example, completing the RequiredPending-to-required transition), the warning is expected. Dependent extensions must be recompiled after updating to the new version of your extension.
  • If the change was unintentional, restore the method to its previous state (add back the body, or restore a deleted method).

To minimize disruption, follow the recommended two-phase lifecycle: use [RequiredPending] before making methods required. Learn more in Interface method lifecycle.

Getting started with AL
Developing extensions
RequiredPending attribute
Analyzer rule AS0148
AS0066
Interface method lifecycle
AppSourceCop analyzer