Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-10 Thread Krinkle
Next steps now written up at https://phabricator.wikimedia.org/T92459#2281878 On Mon, May 9, 2016 at 7:45 PM, Krinkle wrote: > > > On Mon, May 9, 2016 at 7:17 PM, Brion Vibber > wrote: > >> >> >> So, step 2 happens at least 30 days after deploying step 1? Or step 2 >> retains same behavior for

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Krinkle
On Mon, May 9, 2016 at 7:17 PM, Brion Vibber wrote: > > > So, step 2 happens at least 30 days after deploying step 1? Or step 2 > retains same behavior for Output A? > > -- brion > > 14 days [1]. But yes, we'll need some breathing room after step 1. After step 2, old output A would try to load "

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Brion Vibber
On Monday, May 9, 2016, Krinkle wrote: > On Wed, May 4, 2016 at 1:43 PM, Brion Vibber > 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

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Jon Robson
Okay great! :) I got lost in the details. Lets make it so! On Mon, May 9, 2016 at 6:50 AM, Krinkle wrote: > On Sun, May 8, 2016 at 5:47 PM, Jon Robson wrote: > >> Apologies if I'm missing something that makes this so complicated but >> could we not simply throw an error/warning if you use addMod

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Brad Jorsch (Anomie)
On Mon, May 9, 2016 at 9:40 AM, Krinkle wrote: > The corruption I hypothesised is avoided because by design, page styles > modules may not have dependencies. If a module 'foo' ignores that design > requirement and changes regardless to require 'bar', then that change is in > error and should be r

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Krinkle
On Sun, May 8, 2016 at 5:47 PM, Jon Robson wrote: > Apologies if I'm missing something that makes this so complicated but > could we not simply throw an error/warning if you use addModuleStyles > on a module with scripts set That's exactly what I'm proposing we do. https://phabricator.wikimedi

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Krinkle
On Wed, May 4, 2016 at 1:43 PM, Brion Vibber 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 th

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-09 Thread Krinkle
On Wed, May 4, 2016 at 4:23 PM, Brad Jorsch (Anomie) wrote: > On Wed, May 4, 2016 at 6:34 AM, Krinkle wrote: > > > [..] We don't currently require modules to say whether they are a > dynamic module. > > > Maybe we *should* require that. > > Then that could allow us to [remove] the need for gener

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-08 Thread Bartosz Dziewoński
On 2016-05-04 12:34, Krinkle wrote: ## Proposed solution ... Thoughts? Yes. Please. Let's do that! -- Bartosz Dziewoński ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-08 Thread Jon Robson
Apologies if I'm missing something that makes this so complicated but could we not simply throw an error/warning if you use addModuleStyles on a module with scripts set and leave this problem to the engineer to solve? e.g. force 'a.lib' => [ 'styles' => [ 'a.css' ] 'scripts' => ['a.js'] ] to beco

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-04 Thread Brion Vibber
On Wed, May 4, 2016 at 8:23 AM, Brad Jorsch (Anomie) wrote: > On Wed, May 4, 2016 at 6:34 AM, Krinkle wrote: > > [1] If one would allow page style modules to have dependencies and > resolve > > them server-side in the HTML output, this would cause corruption when the > > relationship between two

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-04 Thread Brad Jorsch (Anomie)
On Wed, May 4, 2016 at 6:34 AM, Krinkle wrote: > ## Implicit type > > Aside from the need for dependencies between dynamic and page style > modules. There is another bug related to this. We don't currently require > modules to say whether they are a dynamic module or a page style module. Maybe

Re: [Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-04 Thread Brion Vibber
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 modul

[Wikitech-l] ResourceLoader addModuleStyles() issues

2016-05-04 Thread Krinkle
TL;DR: The current addModuleStyles() method no longer meets our requirements. This mismatch causes bugs (e.g. user styles load twice). The current logic also doesn't support dynamic modules depending on style modules. I'm looking for feedback on how to best address these issues. ResourceLoader is