Make TensorBoard work in raw sources mode #747
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change we withdraw our support for the ECMA
import
keyword hithertomandated by certain tools. In doing so, TensorBoard compiles in seconds, rather
than taking a minute.
The ES6
import
standard only defines / and ./ prefixed paths. All other pathsthat exist are undefined. Since most tooling and early-adopter codebases rely
on the undefined behavior, the standard itself is mostly syntactic sugar (that
isn't even sweet.) The true problem is having a world where Closure, Node, and
web server namespaces coexist.
The ES6
import
keyword makes JavaScript incompatible with web browsers. Thesupport added in Chrome 61 is not sufficient, as it only allows the
export
keyword on functions and not variables. This is a point of view much different
from early-adopters, which raises concerns that the standard is unlikely to
gain a meaningful consensus.
The ES6
import
keyword makes TypeScript incompatible with web browsers. Thiskeyword is not supported by the TypeScript compiler. All it can do is punt the
problem to rollup. However we can't use rollup since it doesn't support Closure
namespaces.
The only tool that supports all three of Web, Node, and Closure namespaces is
the Closure Compiler. Without it, ES6 TypeScript or JavaScript can't run in any
web browser.
But since the Closure Compiler was designed to create production builds for
google.com, it isn't very fast. Therefore it's unreasonable that developers on
a small project like TensorBoard should be expected to wait on this tool
whenever making one line changes in a development iteration cycle.
Since the Closure Tools were originally designed to be compatible with web
browsers in the absense of tooling, this change seeks to bring TensorBoard back
into accordance with those principles.