Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
javascript
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2022 at 12:48 UTC
Updated:
26 Apr 2022 at 21:34 UTC
Jump to comment: Most recent
Comments
Comment #3
nod_Comment #4
nod_Comment #5
nod_Comment #6
wim leersI think this is a very reasonable approach. This discourages further adoption/new usage.
We cannot prevent code choosing to depend on the new internal asset library, but you have to go out of your way to even find this and then you need to willfully ignore it.
This does give ample warning time for maintainers of contrib/custom modules currently depending on core-provided Backbone to refactor their code.
All in all: nice trade-off 👍
Just posted 3 suggestions that would make this even more clear, then this is RTBC IMHO.
Comment #7
catch+1 from me. It's a similar-ish approach we took to the core jQuery UI libraries and it gives us room to manoeuvre in Drupal 10.
Since this blocks lots of other work, and we need to deprecate the library definition in Drupal 9, bumping to critical.
Comment #8
nod_Umm we should do the same for underscore too
Comment #9
effulgentsia commented+1 to this issue. And to doing it for underscore if the contrib list relying on it is similarly small.
Can we and should we add some kind of warning (deprecation? something else?) if something other than toolbar/tour/contextual/quickedit adds backbone.internal as a dependency or tries to add it to #attached?
Comment #10
xjmQuickEdit (contrib) also uses Backbone, but is missing from the IS:
https://git.drupalcode.org/project/quickedit/-/blob/1.0.x/quickedit.libr...
Comment #11
catchAdded.
Comment #12
xjmComment #13
xjmComment #14
nod_updated MR
Comment #15
nod_renamed the library to
core/internal.backboneto put emphasis on the internal part.Comment #16
nod_updated after #3272872: deprecate underscore and mark it internal
Comment #17
xjmThis looks pretty good. Can we add a deprecation test to ensure the old library raises the deprecation notice as intended?
Comment #18
nod_Little scope creep, update the comment on the underscore library too since it got in before this one.
Comment #20
hooroomoo1. Checked that all files that had core/backbone were changed to core/internal.backbone
2. Checked that internal.backbone library was added to vendor-update.js
3. Checked that deprecation message is there and there is a test for it
Comment #21
xjmLoos good. Great work @hooroomoo!
Comment #22
alexpottCommitted 05d8761 and pushed to 10.0.x. Thanks!
Committed ec891b8 and pushed to 9.4.x. Thanks!
Comment #25
xjm