Files
react-native-devtools-frontend/third_party/typescript
Tim van der Lippe 3666e06000 Monkey-patch tsbuildinfo to make it deterministic
The output of .tsbuildinfo files is non-deterministic
(https://github.com/microsoft/TypeScript/issues/37156) which has caused
the Chromium Deterministic Builder to break.

The issue in the file is that arrays and keys in dictionaries are not
sorted. As a workaround to this issue, we had to remove the
`.tsbuildinfo` files from the outputs of the `ts_library`. However, this
has caused new (albeit expected) issues where the TypeScript compiler
breaks for consecutive builds if a Chromium engineer ran `ninja clean`.

To make `ninja clean` happy, we need to include the `.tsbuildinfo` in
our outputs. This fixes the issue with consecutive builds failing.
However, this would then break the deterministic builder again.

As a last resort, we now post-process the tsbuildinfo files after the
invocation to `tsc` and force all arrays and dictionaries to be sorted.

Testing with the TypeScript compiler has shown that this has no effect
on its behavior, as it implicitly does a `json.read`. Since json does
not have a defined ordering, the TypeScript compiler will not break.

I have personally ran several builds and confirmed that both keys and
arrays are sorted as intended.

Bug: 1054494
Change-Id: I352dfc56bb7e4dde27af87fcbe62a36717329d13
Fixed: 1058578
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091448
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-03-09 12:38:27 +00:00
..
2019-11-25 11:52:53 +00:00
2019-11-25 11:52:53 +00:00

Name: TypeScript
Short Name: typescript
URL: Internal
Version: 0.1
License: Apache 2.0
License File: LICENSE
Security Critical: No
Description:
  TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
  This package includes TypeScript integration into Ninja.