Skip to content

Commit 95a806a

Browse files
author
epriestley
committedJan 1, 2014
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
1 parent ba7ac39 commit 95a806a

File tree

5 files changed

+8
-38
lines changed

5 files changed

+8
-38
lines changed
 

‎conf/default.conf.php

-4
Original file line numberDiff line numberDiff line change
@@ -1018,10 +1018,6 @@
10181018
// "phd debug" are always launched in trace mdoe. See also 'phd.verbose'.
10191019
'phd.trace' => false,
10201020

1021-
// Path to custom celerity resource map relative to 'phabricator/src'.
1022-
// See also `scripts/celerity_mapper.php`.
1023-
'celerity.resource-path' => '__celerity_resource_map__.php',
1024-
10251021
// This value is an input to the hash function when building resource hashes.
10261022
// It has no security value, but if you accidentally poison user caches (by
10271023
// pushing a bad patch or having something go wrong with a CDN, e.g.) you can

‎scripts/celerity_mapper.php

+3-19
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,6 @@
189189
"**celerity_mapper.php** [--output __path__] [--with-custom] <webroot>");
190190
$args->parse(
191191
array(
192-
array(
193-
'name' => 'output',
194-
'param' => 'path',
195-
'default' => '../src/__celerity_resource_map__.php',
196-
'help' => "Set the path for resource map. It is usually useful for ".
197-
"'celerity.resource-path' configuration.",
198-
),
199-
array(
200-
'name' => 'with-custom',
201-
'help' => 'Include resources in <webroot>/rsrc/custom/.',
202-
),
203192
array(
204193
'name' => 'webroot',
205194
'wildcard' => true,
@@ -212,8 +201,9 @@
212201
}
213202
$root = Filesystem::resolvePath(reset($root));
214203

215-
$celerity_path = Filesystem::resolvePath($args->getArg('output'), $root);
216-
$with_custom = $args->getArg('with-custom');
204+
$celerity_path = Filesystem::resolvePath(
205+
'../src/__celerity_resource_map__.php',
206+
$root);
217207

218208
$resource_hash = PhabricatorEnv::getEnvConfig('celerity.resource-hash');
219209
$runtime_map = array();
@@ -227,9 +217,6 @@
227217
->withSuffix('swf')
228218
->withFollowSymlinks(true)
229219
->setGenerateChecksums(true);
230-
if (!$with_custom) {
231-
$finder->excludePath('./rsrc/custom');
232-
}
233220
$raw_files = $finder->find();
234221

235222
echo "Processing ".count($raw_files)." files";
@@ -261,9 +248,6 @@
261248
->withSuffix('css')
262249
->withFollowSymlinks(true)
263250
->setGenerateChecksums(true);
264-
if (!$with_custom) {
265-
$finder->excludePath('./rsrc/custom');
266-
}
267251
$files = $finder->find();
268252

269253
echo "Processing ".count($files)." files";

‎src/applications/config/check/PhabricatorSetupCheckExtraConfig.php

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ public static function getAncientConfig() {
167167
'differential.anonymous-access' => pht(
168168
'Phabricator now has meaningful global access controls. See '.
169169
'`policy.allow-public`.'),
170+
'celerity.resource-path' => pht(
171+
'An alternate resource map is no longer supported. Instead, use '.
172+
'multiple maps. See T4222.'),
170173
);
171174

172175
return $ancient_config;

‎src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php

-12
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ public function getOptions() {
2828
"occur. Specify a list of classes which extend ".
2929
"PhabricatorEventListener here."))
3030
->addExample('MyEventListener', pht('Valid Setting')),
31-
$this->newOption(
32-
'celerity.resource-path',
33-
'string',
34-
'__celerity_resource_map__.php')
35-
->setLocked(true)
36-
->setSummary(
37-
pht("Custom celerity resource map."))
38-
->setDescription(
39-
pht(
40-
"Path to custom celerity resource map relative to ".
41-
"'phabricator/src'. See also `scripts/celerity_mapper.php`."))
42-
->addExample('local/my_celerity_map.php', pht('Valid Setting')),
4331
$this->newOption(
4432
'aphront.default-application-configuration-class',
4533
'class',

‎src/infrastructure/celerity/CelerityResourceMap.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ public static function getInstance() {
2020
self::$instance = new CelerityResourceMap();
2121
$root = phutil_get_library_root('phabricator');
2222

23-
$path = PhabricatorEnv::getEnvConfig('celerity.resource-path');
23+
$path = '__celerity_resource_map__.php';
2424
$ok = include_once $root.'/'.$path;
2525
if (!$ok) {
2626
throw new Exception(
27-
"Failed to load Celerity resource map! Check the ".
28-
"'celerity.resource-path' setting in your configuration.");
27+
"Failed to load Celerity resource map!");
2928
}
3029
}
3130
return self::$instance;

0 commit comments

Comments
 (0)
Failed to load comments.