Page MenuHomePhabricator

vector vs Vector: 404 for collapsibleTabs.js with $wgResourceLoaderDebug = true and composer
Closed, DuplicatePublic

Description

Not sure if this is problem with composer installers or vector, here is what happens:

  • get an empty clone of mediawiki core git master
  • put this into composer.local.json:

    { "require": { "mediawiki/vector-skin": "dev-master" }, "minimal-stabilty": "dev" }
  • run composer update
  • run the CLI installer to create LocalSettings.php
  • add $wgResourceLoaderDebug = true

then the console alerts me that http://tools.wikimedia.pl/~saper/sf/skins/Vector/collapsibleTabs.js is 404.

There are skins that usually install into the lowercased directory, too.

MediaWiki core 5b0ebd7f3a6e1c215a6af56d966ee14047a9b44f
Composer version 1.0-dev (1c525b76f81123af180743d31c208c29351cf931) 2015-12-09 15:47:26
skins/vector d09432a65f6183e9dbd2380ed51f447064deee12
composer/installers v1.0.22 bd9b14f094c89c8b5804a4e41edeb7853bb85046 - master a the moment

Event Timeline

saper created this task.Dec 15 2015, 9:07 AM
saper raised the priority of this task from to Needs Triage.
saper updated the task description. (Show Details)
saper added subscribers: saper, Foxtrott, hashar.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 15 2015, 9:07 AM
saper updated the task description. (Show Details)Dec 15 2015, 9:08 AM
saper set Security to None.
saper updated the task description. (Show Details)Dec 15 2015, 9:17 AM
saper updated the task description. (Show Details)
saper updated the task description. (Show Details)Dec 15 2015, 9:21 AM
{
  "require": {
          "mediawiki/Vector-skin": "dev-master"
  },
  "minimal-stabilty": "dev"
}

(capital "V") is the same. Vector gets installed into skins/vector (lowercase "v").

The Git repository uses lower case: mediawiki/skins/vector.git

The name in composer.json is all lowercase: mediawiki/vector-skin that is what is being used by the composer installer.

In composer installer extensions are handled by inflectExtensionVars() which convert the dash separated words to CamelCase. So john-doe becomes JohnDoe.

For skins, there is no case change, inflectSkinVars() simply drop the -skin prefix.

https://github.com/composer/installers/blob/master/src/Composer/Installers/MediaWikiInstaller.php#L34-L48

So I supposed composer install it under lower case /skins/vector, but then /skin.json refers to it with upper case first.

On my filesystem (hfs on Mac) the case doesn't seem to matter.

The Git repository uses lower case: mediawiki/skins/vector.git

No, it definitely uses upper case, and the casing in skin.json matches that.

My bad. I am not sure what happened between the computer and keyboard. The Gerrit project is indeed mediawiki/skins/Vector.

Anyway, the composer installer uses the name that comes from composer.json and that one is lower case:

{
    "name": "mediawiki/vector-skin"
}

Not sure how it can be properly handled since some skins use lower case first while others uses upper first.

Change 259462 had a related patch set uploaded (by saper):
We are Vector, not vector

https://gerrit.wikimedia.org/r/259462

Change 259462 merged by jenkins-bot:
We are Vector, not vector

https://gerrit.wikimedia.org/r/259462