-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
Codecov Report
@@ Coverage Diff @@
## master #440 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 50 50
Lines 1149 1141 -8
=====================================
- Hits 1149 1141 -8
Continue to review full report at Codecov.
|
I don't understand. that's exactly the goal of #377 to get rid of special meaning of certain steps. |
you don't need to actually replace the function, just invoke the replacement instead of the existing one. looking at the code, this is what you do ;-) |
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.
the goal of #377 is to get rid of the once
function. (yes, this will completely break backward compatibility). so there is no special handling of the cont
function anymore. the default pipelines would just ensure to have an (noop) function exported as render
.
Got it. Should we also change the way developers can register functions to extension points, then? Right now we look at the properties |
Ok, so no need to keep deprecated |
Co-Authored-By: Tobias Bocanegra <[email protected]>
I'm not sure I understand... yes, we could keep a separate list of "overrides" and execute those instead of the original functions. But wouldn't that defeat the purpose of sealing the pipeline? Shouldn't we treat custom replacements the same way as before/after hooks? |
BREAKING CHANGE: removed before() and after() methods in favor of use()
yes. your comment in the description was not clear enough - but then I looked at the code, and I think it is correct. |
hmm, true.. I guess any the problem is, that we want to be able to extend the pipe in the
|
I would stay away from (1) and postpone (2). For now, I think I'd keep the @trieloff what's your take here? |
cool, but confusing, indeed.
I don't like that. My suggestion would be 1*: *: we allow the use of arbitrary extensions in |
IMO there are 2 different usage patters or API's here. one is the pipeline API itself. it currently offers a the other usage is what we offer in the defaults, eg the
the instead I propose that the default html pipe only returns the pipeline itself, but the user can then extend and run the pipe. eg:
in order to simplify the attaching, we can have a
which takes an object with
|
From the implementation, it doesn't look like the The second part of this issue was about introducing a way to also replace pipeline steps. Sure, we could now also introduce an officially public The more I think about it, the more I believe that the proposed changes to the extension mechanism would best be moved into a separate issue, and this issue should stay focused on uniforming pipeline steps: |
well, just renaming before/after is not the main focus of the API change. rather that the so the changes would be: pipeline
helix-cli
|
ok, i basically have the changes in the pipeline ready:
will create a related issue for the |
well, ok...let's do this in 2 steps. this PR will just add uniform steps, but leaves the defaults untouched... then we create an additional issue that removes the |
If we remove all |
because we have a default (nop) step called |
I see. Let's create a separate issue for this change. |
adobe/helix-cli#1125 is implemented in helix-cli, adding support replacing pipeline steps. With that this PR addresses all original points of #377 (uniform steps with @trieloff @tripodsan any additional concerns with merging? |
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #377
Note that I slightly deviated from the proposed implementation in #377 in two places:
once()
method for now, mainly because of the special handling of the customer-specified continuation function as potential bearer of custom extensions. It felt cumbersome to check for extensions on every function that gets passed touse()
. Maybe there's a simple and elegant way of doing that, but I didn't find one yet.pipeline.replace()
function, because it would violate the "seal" concept applied inthis.attach()
. Instead I went for athis.attach.replace()
sub function and a check for areplace
export on the continuation function.