On Wed, May 4, 2016 at 1:43 PM, Brion Vibber <[email protected]> wrote:

> Quick notes on the migration path:
>
>
> *Cached page HTML*
>
> HTML cached under the old regime would still be served for a while, but
> ResourceLoader would load the newer style. I *think* that should work as
> long as the new versions of the modules that were included before still
> list the style-only modules as dependencies, assuming load.php doesn't
> throw an exception when the code-plus-style modules are requested.
>
> If load.php would throw an exception in this case, then that's going to be
> a tricky problem to figure out for end-users, who will be presented with
> unstyled pages and no visible error message.
>


The restriction added for T92459 only applies to addModuleStyles() calls.
No changes to load.php HTTP response behaviour.

There is one change required before we enable the new restriction: Convert
internal details of how user/site/gadget modules are registered and loaded.
These will be forward and backward compatible.

The new rule doesn't enable conceptually new features. We are currently
avoiding a certain kind of relationship for performance reasons (dynamic
modules depending on style modules) - which we won't need to avoid any
longer. We'll need to wait for cache to roll over in between two steps to
avoid styles from going missing.

Currently:
* Output A: <link modules=site> (loads site styles), mw.loader.load('site')
- (loads site scripts and styles)

Step 1:
* Create 'site.styles'
* Output A behaviour unchanged
* New Output B: <link modules=site.styles>, site.styles=ready,
mw.loader.load('site') - (loads site scripts and styles)

Step 2:
* Remove styles from 'site', make 'site' depend on 'site.styles' (only
affects startup module)
* No change in HTML output
* Output B new behaviour: <link modules=site.styles>, site.styles=ready,
mw.loader.load('site') - (loads site scripts)


On Wed, May 4, 2016 at 1:43 PM, Brion Vibber <[email protected]> wrote:


> *Extension authors and users of extensions*
>
> If addModuleStyles() throws a PHP exception at page-output time for modules
> that include scripts, that's a breaking change for extension authors and
> the people who use their extensions; but at least the error message will be
> very direct and immediate.
>
>
Yeah, we'll provide good release notes upfront. And probably 1 or 2 week
iteration in git-master with warning only before enforcing with a run-time
exception.


-- Timo
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to