jenkins-bot has submitted this change and it was merged.

Change subject: resourceloader: Remove irrelevant properties from FileModule 
hash
......................................................................


resourceloader: Remove irrelevant properties from FileModule hash

These properties don't affect the module response. They are either
only consumed by OutputPage, or provided by the startup module
directly, which detects its own changes.

Changes to these properties should not invalidate module cache for
these properties.

Follows-up 2f30ff7a8613f87 which added a hook to getDependencies()
but still included the raw 'dependencies' in the definition summary.
But as it turns out, dependencies don't need to be included.

Change-Id: I468e6a6edc352d845dc7a5d06b0ae2a6d809700b
---
M includes/resourceloader/ResourceLoaderFileModule.php
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index 3224b13..4a4a828 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -591,10 +591,14 @@
 
                $options = array();
                foreach ( array(
-                       // T104950: Do not include localBasePath or 
remoteBasePath!
-                       // Those paths may vary over time and needlessly 
invalidate cache. If the path changes
-                       // in a way that makes relative file paths point to 
something else, getFileHashes() will
-                       // account for that already.
+                       // The following properties are omitted because they 
don't affect the module reponse:
+                       // - localBasePath (Per T104950; Changes when absolute 
directory name changes. If
+                       //    this affects 'scripts' and other file paths, 
getFileHashes accounts for that.)
+                       // - remoteBasePath (Per T104950)
+                       // - dependencies (provided via startup module)
+                       // - targets
+                       // - group (provided via startup module)
+                       // - position (only used by OutputPage)
                        'scripts',
                        'debugScripts',
                        'loaderScripts',
@@ -602,12 +606,8 @@
                        'languageScripts',
                        'skinScripts',
                        'skinStyles',
-                       'dependencies',
                        'messages',
-                       'targets',
                        'templates',
-                       'group',
-                       'position',
                        'skipFunction',
                        'debugRaw',
                        'raw',

-- 
To view, visit https://gerrit.wikimedia.org/r/233206
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I468e6a6edc352d845dc7a5d06b0ae2a6d809700b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to