1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00

Remove celerity.resource-path config

Summary: Ref T4222. This was used by Facebook while developing Releeph, but should no longer be necessary since Releeph is in the upstream. I can't get an answer out of Facebook about whether they still use it or not (see T4227), so nuke it. We're going to replace it with a more general mechanism (see T4222).

Test Plan: Regenerated celerity map. Browsed some pages, still got resources.

Reviewers: btrahan, hach-que

Reviewed By: hach-que

CC: aran

Maniphest Tasks: T4222

Differential Revision: https://secure.phabricator.com/D7863
This commit is contained in:
epriestley 2013-12-31 18:02:35 -08:00
parent ba7ac39130
commit 95a806ada3
5 changed files with 8 additions and 38 deletions

View file

@ -1018,10 +1018,6 @@ return array(
// "phd debug" are always launched in trace mdoe. See also 'phd.verbose'.
'phd.trace' => false,
// Path to custom celerity resource map relative to 'phabricator/src'.
// See also `scripts/celerity_mapper.php`.
'celerity.resource-path' => '__celerity_resource_map__.php',
// This value is an input to the hash function when building resource hashes.
// It has no security value, but if you accidentally poison user caches (by
// pushing a bad patch or having something go wrong with a CDN, e.g.) you can

View file

@ -189,17 +189,6 @@ $args->setSynopsis(
"**celerity_mapper.php** [--output __path__] [--with-custom] <webroot>");
$args->parse(
array(
array(
'name' => 'output',
'param' => 'path',
'default' => '../src/__celerity_resource_map__.php',
'help' => "Set the path for resource map. It is usually useful for ".
"'celerity.resource-path' configuration.",
),
array(
'name' => 'with-custom',
'help' => 'Include resources in <webroot>/rsrc/custom/.',
),
array(
'name' => 'webroot',
'wildcard' => true,
@ -212,8 +201,9 @@ if (count($root) != 1 || !is_dir(reset($root))) {
}
$root = Filesystem::resolvePath(reset($root));
$celerity_path = Filesystem::resolvePath($args->getArg('output'), $root);
$with_custom = $args->getArg('with-custom');
$celerity_path = Filesystem::resolvePath(
'../src/__celerity_resource_map__.php',
$root);
$resource_hash = PhabricatorEnv::getEnvConfig('celerity.resource-hash');
$runtime_map = array();
@ -227,9 +217,6 @@ $finder = id(new FileFinder($root))
->withSuffix('swf')
->withFollowSymlinks(true)
->setGenerateChecksums(true);
if (!$with_custom) {
$finder->excludePath('./rsrc/custom');
}
$raw_files = $finder->find();
echo "Processing ".count($raw_files)." files";
@ -261,9 +248,6 @@ $finder = id(new FileFinder($root))
->withSuffix('css')
->withFollowSymlinks(true)
->setGenerateChecksums(true);
if (!$with_custom) {
$finder->excludePath('./rsrc/custom');
}
$files = $finder->find();
echo "Processing ".count($files)." files";

View file

@ -167,6 +167,9 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
'differential.anonymous-access' => pht(
'Phabricator now has meaningful global access controls. See '.
'`policy.allow-public`.'),
'celerity.resource-path' => pht(
'An alternate resource map is no longer supported. Instead, use '.
'multiple maps. See T4222.'),
);
return $ancient_config;

View file

@ -28,18 +28,6 @@ final class PhabricatorExtendingPhabricatorConfigOptions
"occur. Specify a list of classes which extend ".
"PhabricatorEventListener here."))
->addExample('MyEventListener', pht('Valid Setting')),
$this->newOption(
'celerity.resource-path',
'string',
'__celerity_resource_map__.php')
->setLocked(true)
->setSummary(
pht("Custom celerity resource map."))
->setDescription(
pht(
"Path to custom celerity resource map relative to ".
"'phabricator/src'. See also `scripts/celerity_mapper.php`."))
->addExample('local/my_celerity_map.php', pht('Valid Setting')),
$this->newOption(
'aphront.default-application-configuration-class',
'class',

View file

@ -20,12 +20,11 @@ final class CelerityResourceMap {
self::$instance = new CelerityResourceMap();
$root = phutil_get_library_root('phabricator');
$path = PhabricatorEnv::getEnvConfig('celerity.resource-path');
$path = '__celerity_resource_map__.php';
$ok = include_once $root.'/'.$path;
if (!$ok) {
throw new Exception(
"Failed to load Celerity resource map! Check the ".
"'celerity.resource-path' setting in your configuration.");
"Failed to load Celerity resource map!");
}
}
return self::$instance;