Repository navigation
refactor: ts sdk module execution system to use imports - #8653
Conversation
|
Is there a way we can make this change without breaking modules that have already been published to the daggerverse? Can we change the behavior based on the |
I could try to resolve the execution using the registry first, then the executor if it's failing to keep things backward compatible, but that's quite ugly no? Or the reverse (first executor, then registry) EDIT: I ensured the backward compatibility of that changes by using both method to resolve the function. With a test indeed ;) |
fbe2320 to
d553c39
Compare
Rework the way the user's code is imported to be executed to actually uses `imports` instead of loading it from its decorators. This would unblock severals features such as interface supports and compositions. It's also a safer way to actually executes the user's code and resolve default value by reference, specially complex values since they can now be resolve by actually executing them if they are exported. /!\ This is a breaking change! Anything that needs to be executed by the runtime or the introspector now needs to be exported. Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Keep the existing registry to ensure backward compatibility with non-exported classes. Add a test to verify that behaviour. Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
d553c39 to
ecb3b8b
Compare
Signed-off-by: Tom Chauveau <[email protected]>
|
@helderco This is ready for a review! Only the PHP tests are failing which isn't related to this PR |
helderco
left a comment
There was a problem hiding this comment.
Waiting for reply on #8653 (comment)
Co-authored-by: Helder Correia <[email protected]> Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]> Signed-off-by: Vasek - Tom C <[email protected]>
Replied :D |
Rework the way the user's code is imported to be executed to actually uses
importsinstead of loading it from its decorators.This would unblock severals features such as interface supports and compositions.
It's also a safer way to actually executes the user's code and resolve default value by reference, specially complex values since they can now be resolve by actually executing them if they are exported.
The changes are backward compatible.