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.
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
[expressions] changes fork to use namespacing #125957
[expressions] changes fork to use namespacing #125957
Changes from all commits
873d63c
6bd2be8
3b22d31
a35b17c
0041e3b
10c558a
bb0ca6b
b1ddb60
ce05394
4727a77
0fc33f1
aa1fa35
77ae63b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a decorator pattern here is a great idea. What do you think about breaking down the methods to make the class more straightforward?
I see the following points for this:
setup
andstart
are factory methods, so it's better to keep them only producing new instances.Some notes regarding the example above:
super
in the extended class.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we cannot predict that. That's not about the extension necessity but more about abstraction. Those methods seem to be like internal API and not an implementation detail. Even though we export only
start
andsetup
, they define the forked service.That's possible to call them through an extended anonymous class. But in cases like that, we can just put related tests under the
describe('method')
block since it is not a private method.I think it's better if we can extract those into methods. It should not make it less straightforward, but it will be more consistent with the
ExpressionsService
. The latter makes sense because we are actually forking that service.If we do that, it will make the decorator pattern more visible so that it still should be clear that the class is a wrapper.