This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs. This does not
affect the compiled output, and is only done for consistency.
Issue #2638
Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
The Closure Library's base.js, the Closure Compiler, and the Closure
deps-writer are all now loaded via NPM instead of commiting them
directly to the repo. This also updates both the library and compiler
to the latest version: 20200406.
We still have a fork of the Closure Library's URI parser. The latest
upstream version of that has too many dependencies on the rest of the
library to import directly from NPM.
Some internals of the build system have been refactored, and the
"complete" set of files in the build system now includes third_party.
Our forked URI parser does not pass lint checks yet, so the linter
does not run over third_party yet.
A couple of overly-severe sets of compiler checks have been disabled,
since even the latest Closure Library's base.js doesn't pass them.
The script-loader in load.js had to be updated for compatibility with
the new Closure Library. If you don't return "true" now, Closure's
base.js will stop loading subsequent source files.
Some local externs that we had written are now available from the
compiler, so our local copies have been deleted.
A few type-related changes have been made as well, removing casts that
were necessary with the old compiler, but not necessary with the new
one.
Finally, this corrects some type issues in the tests using the new
"typeof" annotation from the compiler. This allows us to type a
variable as a class defined elsewhere. For example, after loading the
compiled library, we can reference compiledShaka.Player, which has the
type "typeof shaka.Player". The compiler can then type-check all uses
of it in the tests.
Closes#2528 (bad polyfill code generated by the old compiler)
Change-Id: I62ec61e82d4edf342b2c576c2d4f89f11562ee65
Under Windows, the default encoding isn't UTF-8, so we are getting
encoding errors when trying to read files. This adds a helper to
explicitly set the encoding to UTF-8 in Python3. This doesn't really
affect Python2 since it reads the file as byte strings.
We can't use 'locale.setlocale' to fix this since (at least on my
machine) we can't set the encoding to be UTF-8 on Windows.
Fixes#2206
Change-Id: I76e35cc9ae638b433ca61c7bda6478e989bc755a
Also unified CSS/less style based on that.
This does have to use a forked version of stylelint, since there
is a bug (?) in the globbing library they use that causes it to
fail on our buildbot. I found the simplest solution was just to add
an option to disable globbing, a feature we weren't using anyway.
Closes#1867
Change-Id: I9295b01d5b15d060356e314938b64b551b75de6a
Now if the build scripts change, the auto-detection for changed files
will force the library to be rebuilt. This allows detecting changes to
the build script when determining if there are changes.
Change-Id: Ibf4fc3fb2197ae5993c9acd7adb65c88e205b6f4
When we change the tutorials, this should trigger a rebuild of the
docs. The full list of source files for the docs is now correct, so
changes to any of them will trigger a rebuild of the docs.
Change-Id: I2328e592237735e41508e8bb984d062e687c8104
In some cases, build/check.py is run before there are no generated
localizations. Although this doesn't care what locales are built,
something needs to be built anyway. So we need a default value to
build with in this case.
Change-Id: Ie7af33d4ba5576ed68d4d558710254012f7d7784
This changes the format of the localization data to enable apps to
trivially lazy-load translations. It also adds --locales to the build
scripts to allow app developers to choose the compiled-in locales.
The generated output now goes into dist/ and is not checked into
revision control. Finally, it adds "description" and "meaning" fields
to the source messages to allow us to more easily integrate with a
context-aware human translation service. The "description" field
provides application context for the translator, while the "meaning"
field provides linguistic disambiguation for words with multiple
meanings or parts of speech in the original English.
Because the translation service wants to collapse messages with
identical text, we had to merge several messages together. To this
end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the
messages themselves and collapsed what remained.
Issue #1688
Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc
I will break up our monolithic less file into pieces, but first the
build system needs to understand this. It should see changes to any
less file as warranting a rebuild, but the actual compiler command
only takes the top-level less file on the command-line.
Pre-work for #1703, #1709, and b/116651454
Change-Id: I7be8f9467fa6df449f89ed8f5488fc1c735f0b75