-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: Redesigned the way functions are resolved #76
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FunctionMetadata.cs have been added to make it easier to add function aliases and make the function part lighter. Added FunctionMetadata.cs makes it possible to register a function on multiple aliases. Furthermore, only the FunctionMetadata class is retrieved as a list from DI, thus not building the function before it is actually needed, making room for more heavy dependencies, without making the entire engine slow. Resolved #47, Resolved #58. Still need to clean up.
This was
linked to
issues
Feb 28, 2022
Closed
The new way of registering and finding function implementation makes the abstract class obsolete and confusing and it is therefore removed
🎉 This PR is included in version 4.0.0-dev.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft pull request to discuss #47 and #59
This is a draft of the solution to solve the related keywords and is meant to open a discussion of the possible solution(s).
Design choices:
Why didn't you have an alias list instead: Having a metadata class with a list instead of a string seems simpler. However, it is difficult to extend the list and easier to just add a new metadata object. In general, there will not be more resolving related to function than the previous solution, but the new solution makes it possible (and easy) for users to add aliases, i.e. multiple metadata registrations can register for the same class, with the same function name.
It's still possible to overwrite functions by registering a new metadata class, after the one You want to overwrite. (The resolved list is in chronological order)