Problem/Motivation
We're close to being able to close #2797169: Mark BigPipe as stable/non-experimental, which will mark BigPipe stable. As of that time, BigPipe's APIs will be frozen.
Except that's the thing: the BigPipe module provides no API, it only provides functionality.. BigPipe simply uses the Render API and the request processing system's APIs.
We guarantee BC for its functionality/behavior, but not for the exact code implementation details.
In the future, we may add APIs. For example in #2632750: Interface previews/skeleton screens through optional "preview" or "placeholder" templates.
Proposed resolution
Mark all of BigPipe's classes as @internal
.
Remaining tasks
None.
User interface changes
None.
API changes
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff.txt | 1.77 KB | effulgentsia |
#6 | 2835604-6.patch | 1.41 KB | effulgentsia |
#4 | 2835604-4.patch | 1.32 KB | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThanks for this issue. https://www.drupal.org/core/d8-bc-policy already says that service and controller implementations are not part of the public API. So I think we only need
@internal
added toBigPipeInterface
andBigPipeResponse
. I think we should also add a sentence to each of those two explaining why they're internal.Comment #4
Wim LeersOk. Did that.
But https://www.drupal.org/core/d8-bc-policy says … so wouldn't it be safer to mark all of these
@internal
?Comment #5
Wim LeersThis is a documentation-only patch.
Comment #6
effulgentsia CreditAttribution: effulgentsia at Acquia commentedHow about this instead? This changes some wording, and also moves the @internal from BigPipeInterface to just the sendContent() method. That way, contrib modules such as
big_pipe_sessionless
, or whatever else is experimenting with extending big_pipe, can safely type hint to BigPipeInterface without IDE warnings. Meanwhile, https://www.drupal.org/core/d8-bc-policy#interfaces gives room for us to add new methods to the interface.Comment #7
effulgentsia CreditAttribution: effulgentsia at Acquia commentedI don't think so. I don't see why big_pipe services and controllers should be considered any more internal than any other module's services and controllers. If at some point we want to change our bc policy across the board for services and controllers, then at that point we'll need to add @internal to those classes in many modules, and can cover big_pipe ones as part of that.
Comment #8
Wim Leers#6: That's even better, thanks!
#7: Okay, that's fair!
Comment #9
Wim LeersI also updated #2797169: Mark BigPipe as stable/non-experimental earlier today, see #2797169-2: Mark BigPipe as stable/non-experimental.
Comment #11
catchCommitted pushed to 8.3.x and cherry-picked to 8.2.x, thanks!
Comment #13
Wim LeersThanks!
Comment #14
xjmI wonder, why do we provide an interface at all if we don't mean it as an extension point? Should we remove it? We can do so even though the API was not @internal before since BigPipe was only ever in alpha.
BTW, I do think everything that's internal should be explicitly marked so, rather than relying on the handbook page. See #2550249: [meta] Document @internal APIs both explicitly in phpdoc and implicitly in d.o documentation. So IMO Wim's first patch was fine, although we can scope
Comment #15
Wim LeersExactly! This, +100. I was wondering the exact same thing while working on this. We just have the rule that "type hints must use interfaces", that's why we
\Drupal\big_pipe\Render\BigPipeInterface
exists at all.I'd be strongly in favor.
Right, exactly — that removes all doubt.
If that feels a bit strange/excessive, I agree, but the reality is that "what is an API?" is an opt-out thing in Drupal, not an opt-in thing. When we have
@api
, that will become opt-in, and then we wouldn't have to do anything here.Shall I create a new issue then, to:
BigPipeInterface
and move all of its docs to the implementation.@internal
to all other classes like in #2?Comment #16
xjm+1.
Per @catch's suggestion, let's instead do this in bulk patches across core for each of the "kinds of thing" the other classes are in #2550249: [meta] Document @internal APIs both explicitly in phpdoc and implicitly in d.o documentation. That way each kind of internal-by-default thing will be consistent.
Comment #17
Wim LeersComment #18
xjm#2550249: [meta] Document @internal APIs both explicitly in phpdoc and implicitly in d.o documentation will not be marked fixed without the child issues being done for each of the kinds of internal things . (And it's a pet concern for committers since API visibility and stability is the hardest problem we have to hash out on a daily basis.) :) We could also kick things off by filing child issues of the meta for (e.g.) "Mark controllers as @internal", "Mark foo services as internal", etc. for the things we would have fixed here.
Comment #19
Wim LeersHah, works for me! :D