Skip to content

feat: introduce DefaultExtensionCatalog.DEFAULT_COLLECTION#529

Merged
vbarua merged 1 commit into
mainfrom
vbarua/default-extension-collection
Oct 1, 2025
Merged

feat: introduce DefaultExtensionCatalog.DEFAULT_COLLECTION#529
vbarua merged 1 commit into
mainfrom
vbarua/default-extension-collection

Conversation

@vbarua
Copy link
Copy Markdown
Member

@vbarua vbarua commented Oct 1, 2025

Provide convenient static instance of default ExtensionCollection

BREAKING CHANGE: removed SimpleExtension.loadDefaults

Provide convenient static instance of default ExtensionCollection

BREAKING CHANGE: removed SimpleExtension.loadDefaults
public static final String FUNCTIONS_STRING = "/functions_string.yaml";

public static final SimpleExtension.ExtensionCollection DEFAULT_COLLECTION =
loadDefaultCollection();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can load the default ExtensionCollection once, and then share it everywhere.

@vbarua
Copy link
Copy Markdown
Member Author

vbarua commented Oct 1, 2025

Looking through #522, I noticed that we were calling SimpleExtension.loadDefaults in a number of places. Every we do this, we have to load the default extensions from their files, and reprocess them. This seems wasteful. I had a back of mind item to cache these within DefaultExtensionCollection, and now seem like as good a time as any.

@vbarua vbarua marked this pull request as ready for review October 1, 2025 00:57
Copy link
Copy Markdown
Member

@nielspardon nielspardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👊

@vbarua vbarua merged commit a15d9c7 into main Oct 1, 2025
12 checks passed
@vbarua vbarua deleted the vbarua/default-extension-collection branch October 1, 2025 14:38
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.

3 participants