Skip to content

Conversation

@danvervlad
Copy link
Contributor

Summary

  • Adds the ability to mark actions, conditions, and expressions as deprecated in extension functions
  • Displays visual deprecation warnings in the Events Sheet when deprecated functions are used
  • Allows extension authors to provide a deprecation message explaining what to use instead

Changes

Core/GDCore:

  • Added SetDeprecationMessage and IsDeprecated methods to InstructionMetadata, ExpressionMetadata, and MultipleInstructionMetadata
  • Added DeprecatedExpression error type to ExpressionParserError
  • Extended InstructionValidator with ValidateParameter that returns both validity and deprecation status via new ParameterValidationResult struct
  • Added deprecation fields to EventsFunction model (isDeprecated, deprecationMessage)

Events Sheet (UI):

  • Displays [DEPRECATED] prefix for deprecated actions and conditions
  • Shows deprecation message in tooltips
  • Highlights deprecated expressions with visual styling (background highlight)
  • Respects the existing showDeprecatedInstructionWarning preference flag

Extension Editor:

  • Added "Deprecated" checkbox in function properties
  • Added "Deprecation message" text field when function is marked deprecated

@danvervlad danvervlad requested a review from 4ian as a code owner January 21, 2026 14:59
@danvervlad
Copy link
Contributor Author

Function properties

With Deprecated = true

83955

With Deprecated = false

26225

With Show a warning on deprecated actions and conditions = true

7619

In event sheet

62048

In action/condition details

47019

In expression details

81063

With Show a warning on deprecated actions and conditions = false

17845

In event sheet

92429

In action/condition details

45701

In expression details

28916

@danvervlad
Copy link
Contributor Author

In extension json, for serialization
99362

@4ian
Copy link
Owner

4ian commented Jan 26, 2026

Hello! Thanks for opening this PR.

The extension editor UI is still a bit rough today (the extension editor has changed a lot lately and we still try to improve it). The "Private" checkbox should have been named "Hidden": when you check it, you will see that existing usages of the function appear in yellow. So I wonder if this would have fitted your need?

More context: We try to make depreciation as transparent as possible for users. This means:

  • "Deprecated" functions are never removed from reviewed extensions to ensure compatibility with old projects
  • "Deprecated" functions are no longer visible to users when they add new actions, but the name of the new action is usually the same so they only notice that the list of parameter has changed

In your case, I guess you want to have the deprecation explanation shown to your users?
I will discuss this a bit more with the rest of the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants