Page MenuHomePhabricator

D8335.id19822.diff
No OneTemporary

D8335.id19822.diff

Index: .divinerconfig
===================================================================
--- .divinerconfig
+++ .divinerconfig
@@ -31,4 +31,3 @@
["DivinerXHPEngine", {}]
]
}
-
Index: scripts/build_xhpast.sh
===================================================================
--- scripts/build_xhpast.sh
+++ scripts/build_xhpast.sh
@@ -13,9 +13,9 @@
cd $ROOT
if [ $USE_GMAKE -eq 1 ]; then
- gmake clean all install
+ gmake clean all install
else
- make clean all install
+ make clean all install
fi
echo
Index: scripts/format_log.php
===================================================================
--- scripts/format_log.php
+++ scripts/format_log.php
@@ -8,4 +8,3 @@
while (($line = fgets($f)) !== false) {
echo stripcslashes($line);
}
-
Index: scripts/sandpit/harden_directory.php
===================================================================
--- scripts/sandpit/harden_directory.php
+++ scripts/sandpit/harden_directory.php
@@ -200,4 +200,3 @@
return $map;
}
-
Index: src/docs/aws.diviner
===================================================================
--- src/docs/aws.diviner
+++ src/docs/aws.diviner
@@ -5,4 +5,4 @@
= Mega Alpha =
-NOTE: These APIs are really sketchy right now.
\ No newline at end of file
+NOTE: These APIs are really sketchy right now.
Index: src/docs/drafts/dom_datastore.txt
===================================================================
--- src/docs/drafts/dom_datastore.txt
+++ src/docs/drafts/dom_datastore.txt
@@ -1,4 +1,3 @@
-
This document describes what you should put in the DOM (display) and what you shouldn't (data). It is adapted from an e-mail to javascript@lists.
=The DOM is Not a Datastore. Don't Store Application State in the DOM.=
@@ -63,11 +62,10 @@
Second, it's way way less bad to use non-DOM properties of DOM objects to hold appropriate state. For instance, code like this (related to the earlier bug) is inherently fragile:
<code> COUNTEREXAMPLE
- if (container.childNodes[i].className == 'friends_'+entity)
+ if (container.childNodes[i].className == 'friends_'+entity)
</code>It relies on unchanging DOM relationships, it relies on nothing and no one ever touching className, and it constructs a classname programmatically which makes it more difficult to debug when it breaks or find when it you're changing things. A far less bad implementation might use :DOMStorage:
<code> if (DOMStorage.getData(container.childNodes[i], 'privacyType') == entity)
</code>This is still kind of nasty and I'd argue that a better design would see the code iterating over objects instead of over DOM nodes, using getters, and calling rendering methods to make changes reflect in the DOM. But, at the least, this is much less fragile and usually a practical alternative which doesn't require all that time-consuming "software engineering" associated with using classes and objects.
-
Index: src/docs/drafts/javascript_scope_resolution.txt
===================================================================
--- src/docs/drafts/javascript_scope_resolution.txt
+++ src/docs/drafts/javascript_scope_resolution.txt
@@ -146,4 +146,3 @@
add.apply(3, [5]);
</code>But, there's generally an easier way than <tt>call</tt> or <tt>apply</tt>: bind() (which you should probably read next).
-
Index: src/docs/drafts/using_exceptions.txt
===================================================================
--- src/docs/drafts/using_exceptions.txt
+++ src/docs/drafts/using_exceptions.txt
@@ -114,4 +114,3 @@
A corollary to this is that you should avoid throwing :Exception unless you do not expect any caller to handle the exception. Essentially, throwing Exception is guaranteeing program termination (albeit via a graceful stack unwind and sensible top-level behavior rather than abrupt exit). The major use for this is checking invariants to detect that an API is being misused so you can communicate to the caller that they have strictly and unambiguously abused your interface.
Because PHP has no <tt>finally</tt> clause, it is acceptable to catch :Exception if you are cleaning up resources and then re-throwing, although most kinds of resources that need cleanup (like database transactions and temporary files) already have exception-aware APIs that will handle this for you.
-
Index: src/docs/drafts/using_queryfx.txt
===================================================================
--- src/docs/drafts/using_queryfx.txt
+++ src/docs/drafts/using_queryfx.txt
@@ -1,4 +1,3 @@
-
This document describes how to use queryfx(), an extended form of queryf().
= What queryfx() Does =
@@ -179,4 +178,3 @@
</code>In most cases, it is sufficient to catch <tt>QueryException</tt> and consider it an unrecoverable error at the top level. However, you may find the fine-grained exceptions useful when building abstractions, debugging, or under unusual use cases.
One caveat is that memcache_dispatch() is exception-aware but can not currently expose exceptions at the top level. Instead, it will convert <tt>QueryExceptions</tt> into an implicity null return value from your database/generator function. This may be fixed in the future but requires improving some abstractions.
-
Index: src/docs/overview.diviner
===================================================================
--- src/docs/overview.diviner
+++ src/docs/overview.diviner
@@ -32,7 +32,7 @@
The major components of libphutil are:
- - **Core Utilties**: a collection of useful functions like @{function:ipull}
+ - **Core Utilities**: a collection of useful functions like @{function:ipull}
which simplify common data manipulation;
- **Filesystem**: classes like @{class:Filesystem} which provide a strict API
for filesystem access and throw exceptions on failure, making it easier to
Index: src/docs/using_futures.diviner
===================================================================
--- src/docs/using_futures.diviner
+++ src/docs/using_futures.diviner
@@ -88,4 +88,4 @@
}
Consult the @{class:FutureIterator} documentation for detailed information on
-class capabilities.
\ No newline at end of file
+class capabilities.
Index: src/events/PhutilEvent.php
===================================================================
--- src/events/PhutilEvent.php
+++ src/events/PhutilEvent.php
@@ -38,8 +38,3 @@
}
}
-
-
-
-
-
Index: src/filesystem/FileFinder.php
===================================================================
--- src/filesystem/FileFinder.php
+++ src/filesystem/FileFinder.php
@@ -266,4 +266,3 @@
return '"(" '.$items.' ")"';
}
}
-
Index: src/filesystem/Filesystem.php
===================================================================
--- src/filesystem/Filesystem.php
+++ src/filesystem/Filesystem.php
@@ -1055,4 +1055,3 @@
}
}
-
Index: src/future/aws/PhutilAWSException.php
===================================================================
--- src/future/aws/PhutilAWSException.php
+++ src/future/aws/PhutilAWSException.php
@@ -46,4 +46,3 @@
}
}
-
Index: src/future/exec/CommandException.php
===================================================================
--- src/future/exec/CommandException.php
+++ src/future/exec/CommandException.php
@@ -75,4 +75,3 @@
}
}
-
Index: src/future/http/status/HTTPFutureResponseStatus.php
===================================================================
--- src/future/http/status/HTTPFutureResponseStatus.php
+++ src/future/http/status/HTTPFutureResponseStatus.php
@@ -41,4 +41,3 @@
abstract protected function getErrorCodeDescription($code);
}
-
Index: src/future/http/status/HTTPFutureResponseStatusCURL.php
===================================================================
--- src/future/http/status/HTTPFutureResponseStatusCURL.php
+++ src/future/http/status/HTTPFutureResponseStatusCURL.php
@@ -84,4 +84,3 @@
}
}
-
Index: src/future/http/status/HTTPFutureResponseStatusHTTP.php
===================================================================
--- src/future/http/status/HTTPFutureResponseStatusHTTP.php
+++ src/future/http/status/HTTPFutureResponseStatusHTTP.php
@@ -63,4 +63,3 @@
}
}
-
Index: src/future/http/status/HTTPFutureResponseStatusParse.php
===================================================================
--- src/future/http/status/HTTPFutureResponseStatusParse.php
+++ src/future/http/status/HTTPFutureResponseStatusParse.php
@@ -31,4 +31,3 @@
}
}
-
Index: src/future/http/status/HTTPFutureResponseStatusTransport.php
===================================================================
--- src/future/http/status/HTTPFutureResponseStatusTransport.php
+++ src/future/http/status/HTTPFutureResponseStatusTransport.php
@@ -44,4 +44,3 @@
}
}
-
Index: src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupHeaderBlockRule.php
===================================================================
--- src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupHeaderBlockRule.php
+++ src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupHeaderBlockRule.php
@@ -11,8 +11,8 @@
if (preg_match('/^(={1,5}).*+$/', $lines[$cursor])) {
$num_lines = 1;
} else {
- if (isset($lines[$cursor+1])) {
- $line = $lines[$cursor] . $lines[$cursor+1];
+ if (isset($lines[$cursor + 1])) {
+ $line = $lines[$cursor] . $lines[$cursor + 1];
if (preg_match('/^([^\n]+)\n[-=]{2,}\s*$/', $line)) {
$num_lines = 2;
$cursor++;
Index: src/parser/PhutilEmailAddress.php
===================================================================
--- src/parser/PhutilEmailAddress.php
+++ src/parser/PhutilEmailAddress.php
@@ -86,4 +86,3 @@
}
}
-
Index: src/parser/PhutilGitURI.php
===================================================================
--- src/parser/PhutilGitURI.php
+++ src/parser/PhutilGitURI.php
@@ -86,4 +86,3 @@
}
}
-
Index: src/parser/PhutilURI.php
===================================================================
--- src/parser/PhutilURI.php
+++ src/parser/PhutilURI.php
@@ -172,4 +172,3 @@
}
}
-
Index: src/utils/utf8.php
===================================================================
--- src/utils/utf8.php
+++ src/utils/utf8.php
@@ -772,4 +772,3 @@
return $components;
}
-
Index: src/xsprintf/PhutilQsprintfInterface.php
===================================================================
--- src/xsprintf/PhutilQsprintfInterface.php
+++ src/xsprintf/PhutilQsprintfInterface.php
@@ -10,4 +10,3 @@
public function escapeMultilineComment($string);
public function escapeStringForLikeClause($string);
}
-
Index: support/xhpast/generate_nodes.php
===================================================================
--- support/xhpast/generate_nodes.php
+++ support/xhpast/generate_nodes.php
@@ -144,6 +144,3 @@
$php .= "}\n";
file_put_contents('parser_nodes.php', $php);
echo "Wrote PHP definition.\n";
-
-
-
Index: support/xhpast/xhpast.cpp
===================================================================
--- support/xhpast/xhpast.cpp
+++ support/xhpast/xhpast.cpp
@@ -126,4 +126,3 @@
printf("]");
}
}
-

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 3:55 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718730
Default Alt Text
D8335.id19822.diff (10 KB)

Event Timeline