Commit Graph
97 Commits
Author SHA1 Message Date
Takuto Ikuta 0795505dd0 typescript: use esbuild for non-official in-chromium build
I confirmed that devtools_skip_typecheck works in chromium CQ in
https://crrev.com/c/3435231/6

This improves build time of chrome like belows
* 279.3s -> 223.7s in debug build
* 327.8s -> 170.7s in release build
on my 24C/48T Z840 Linux machine when goma backend cache is warmed.

Caveat is slight increase of execution time in tests if that run
devtools code path.
https://crbug.com/1278663#c90

Bug: 1278663
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_linux_blink_light_rel_fastbuild,devtools_frontend_linux_dbg_fastbuild
Change-Id: Ie9e5b4788a36fd46b259376baf35beeccecab70c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439325
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2022-02-04 11:05:10 +00:00
Takuto Ikuta a0c5f789d1 DEPS: update esbuild version to 0.14.13
This is mainly to fix missing .exe extention in Windows CIPD package.

ref: https://github.com/evanw/esbuild/releases/tag/v0.14.13

Bug: 1278663
DISABLE_THIRD_PARTY_CHECK=CIPD package extension is changed on Windows
Change-Id: I92d36a0b9f287a7582caaf921b4203828e9b9635
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3401995
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-25 10:50:08 +00:00
Takuto Ikuta 95a359d10c typescript: introduce devtools_skip_typecheck build flag
This is experimental flag introducing esbuild for typescript transpiler.

I needed to modify some test code to pass tests with esbuild.

Bug: chromium:1278663
DISABLE_THIRD_PARTY_CHECK=need to add esbuild DEPS too
Change-Id: I661951fc4fd8f5e6a2a599e531638ab294f887f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3330076
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2022-01-24 02:19:51 +00:00
Paul Lewis 982b1a562e Removes aerotwist from OWNERS
Thanks for everything :)

DISABLE_THIRD_PARTY_CHECK=Necessary for change

Bug: None
Change-Id: I1769098f0379eb919fb77ba8e98564642c8cc387
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3386941
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-14 16:41:50 +00:00
Tim van der Lippe 29e992fe79 Remove intl_display_names.d.ts
TypeScript 4.5 now ships these types 🎉

DISABLE_THIRD_PARTY_CHECK=TypeScript fix
R=jacktfranklin@chromium.org

Bug: 1247589
Change-Id: Iea95c4f95b08c36f2bc882e03b5fc38357a07225
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3366665
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-01-05 16:25:58 +00:00
Takuto Ikuta 4e6607c7dc typescript: emit formatted tsconfig.json
This is to make codesearch useful when seeing tsconfig.json.
https://source.chromium.org/chromium/chromium/src/+/main:out/Debug/gen/third_party/devtools-frontend/src/front_end/core/i18n/bundle-tsconfig.json;drc=7f8782ff3c5807082633a00e362e7a99d89c0247

Also introduce env logging flag for behavior investigation in local
build.

Bug: chromium:1278663
Change-Id: I930c70428db7710142b58981a79c16bcab85f7f3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3328479
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
2021-12-10 10:55:01 +00:00
Tim van der Lippe caa1d30552 Enable efficient rebuilding of Node targets
We had to revert resetting timestamps for all typescript
targets to combat non-determinism in the production build. However,
the Node targets that we have do not suffer from the same fate:
they don't need to integrate with Rollup and don't expose a separate
entrypoint that you need to use types for.

Therefore, opt-in all Node targets to efficient rebuilding. This
should speed up the rebuilding of all test targets under test/e2e.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: If50e7fd25a483825d85c4e235499059f5c1472d9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3158383
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-09-27 13:41:45 +00:00
Tim van der Lippe 8034be46bd Fix type lookup in front_end unittests
When working on upgrading `@types/node` I discovered that our
Karma unit tests were accidentally including our Node types,
even though these tests don't run in a Node environment.

As it turns out, we were including the `node_modules/@types`
folder in our compilations when `opts.test_only` is set. Since
our unittests are marked as `test_only`, they would then pull
in *all* `@types` packages.

To combat that problem, we can use yet another TypeScript config
option that allows us to specify which exact packages TypeScript
is allowed to pull in. We list all packages that we currently rely
on in the relevant environments, so that we are no longer
accidentally including `@types/node` in our Karma unit tests.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I896297e3af7a72068b68e2424da2c89b3935573e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3158228
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-09-13 14:59:49 +00:00
Tim van der Lippe 58df6650e1 Update timestamps for devtools_modules only
The previous attempt was wrong, as it wasn't correctly rebuilding
dependents if a breaking TypeScript API change was made. The root
cause for that is the split of `devtools_entrypoint` and
`devtools_module`, which we need for bundling. Unfortunately, we
also can't introduce granular GN targets for only `.d.ts` files,
since TypeScript generates all outputs in 1 go. Therefore, it is not
possible to split that up into multiple scripts, which is required
if we want to introduce targets with outputs for only `.d.ts`.

Instead, we should still reset timestamps for `devtools_module`,
but then we always rebuild `devtools_entrypoint`. By doing that,
a breaking API change in a `devtools_module` would trigger its
corresponding `devtools_entrypoint` to change, which will ensure
that all its dependents also change. However, the next layer of
`devtools_module` will then detect that it doesn't change, hence
introducing the performance improvement.

So while we are still doing a bit too much work in theory, in practice
this change already removes a whole bunch of unnecessary work. I
think that is a step in the right direction and this should result
in deterministic builds as well.

DISABLE_THIRD_PARTY_CHECK=Update TypeScript infrastructure
R=jacktfranklin@chromium.org
CC=marijnh@gmail.com

Bug: 1237438
Change-Id: Ib8ea10ee8df263f0dddf0918bc1732fd696f1105
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3107130
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-08-19 15:04:34 +00:00
Tim van der Lippe 6144bd12a6 Revert "Fix recompilation issues with timestamps for generated sourcemaps"
This reverts commit 5c9fbe66ff.

Reason for revert: Breaks compilation of API breakages of existing
methods.

Original change's description:
> Fix recompilation issues with timestamps for generated sourcemaps
>
> Recently, we have been observing increased GN recompilation times.
> It's unclear why they started happening (we are currently thinking
> it was related to an update of the TypeScript compiler), but we did
> discover a bug in our timestamp resetting behavior.
>
> When inspecting the build output, I discovered that the timestamps
> for the `.js.map` files would always be increased, even if the content
> was unchanged. The `.js` and `.d.ts` maps would see their timestamps
> properly reset.
>
> As it turns out, the replacement extension that we used to reset
> all files was `.map` rather than `.js.map`. That's because the source
> map files that would be generated would end in `.js.map` and since
> the original file ends with `.ts`, we have to do the full replacement.
>
> I have confirmed that making a single change in a random file that
> does not affect the public API will properly work.
>
> R=​jacktfranklin@chromium.org
>
> Fixed: 1237438
> Change-Id: Iaec168c45632845e3da140e7cdb0a621a3d1702f
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3081731
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>

Bug: 1237438
Change-Id: Ia0394ef3b22a06deacb912f21a901aacb1141d7e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093156
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-08-13 12:39:54 +00:00
Tim van der Lippe 5c9fbe66ff Fix recompilation issues with timestamps for generated sourcemaps
Recently, we have been observing increased GN recompilation times.
It's unclear why they started happening (we are currently thinking
it was related to an update of the TypeScript compiler), but we did
discover a bug in our timestamp resetting behavior.

When inspecting the build output, I discovered that the timestamps
for the `.js.map` files would always be increased, even if the content
was unchanged. The `.js` and `.d.ts` maps would see their timestamps
properly reset.

As it turns out, the replacement extension that we used to reset
all files was `.map` rather than `.js.map`. That's because the source
map files that would be generated would end in `.js.map` and since
the original file ends with `.ts`, we have to do the full replacement.

I have confirmed that making a single change in a random file that
does not affect the public API will properly work.

R=jacktfranklin@chromium.org

Fixed: 1237438
Change-Id: Iaec168c45632845e3da140e7cdb0a621a3d1702f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3081731
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-08-09 17:27:27 +00:00
Tim van der Lippe 0ae86e8a9c Remove .tsbuildinfo files after compilations
Incremental compilations can break if engineers clean their out
directory with `ninja -t clean` and then attempt to recompile.
This has historically also led to spurious build failures when
output directories are manually (incorrectly) cleaned.

Instead, we should remove these `.tsbuildinfo` files. These files
are a side-effect of enabling `incremental: true`, which is
required to enable incremental recompilation based on previous
build output. However, we don't actually need to use these files
for up-to-dateness checks, as GN already "runs the world".

Therefore, after any compilation (even unsuccesful ones), we
should manually remove these files.

Confirmed to fix when building and cleaning:

```
autoninja -C out/Default inspector_overlay:build_inspector_overlay
ninja -C out/Default -t clean front_end/core/common:bundle
autoninja -C out/Default inspector_overlay:build_inspector_overlay
```

R=alexrudenko@chromium.org

Fixed: 1225476
Change-Id: I1f236187d3a80fd7f3eb6281cc77b92bb645410f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3006575
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-07-05 15:13:15 +00:00
Tim van der Lippe 46244285d4 Cleanup TypeScript configuration files and root OWNERS
This moves the required TypeScript configuration files into
/config/typescript/, which allows us to cleanup the root OWNERS.
Doing so will make it easier to make infrastructure refactorings
in our TypeScript configuration (if we for example need to add
a new file), while not requiring ENG_REVIEW_OWNERS.

DISABLE_THIRD_PARTY_CHECK=Configuration changes
R=yangguo@chromium.org,szuend@chromium.org

Bug: none
Change-Id: Icffd52d37c37b52651dc8125948dc90b2b79cdf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975287
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-22 10:45:59 +00:00
Tim van der Lippe 01778c1ce4 Move Node type declarations to node_ts_library
These particulary type definition files only affect Node targets,
e.g. those used during tests. They don't cause any change to the
front_end itself and should therefore not be included as input
to all ts_library targets.

R=szuend@chromium.org

Fixed: 1209844
Change-Id: If07a765299610ef8eb47b10931b5d0ad56551b67
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2900479
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-18 10:47:54 +00:00
Tim van der Lippe 443cc1e549 Move CodeMirror types to third_party/codemirror
Some files that don't import codemirror itself do refer to types
as declared by CodeMirror, which therefore need to implicitly
side-effect import the types. The reason being that these files
are used in both the standalone and full version of CodeMirror
(depending on whether they run in a worker context or not).
Therefore, they can't import `third_party/codemirror/codemirror.ts`,
as that would only contain the full version.

DISABLE_THIRD_PARTY_CHECK=Tsc update
R=szuend@chromium.org

Bug: 1209844
Change-Id: I8719a15b40e9d9f085b24c05af4372ad84812d1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897979
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-18 10:07:14 +00:00
Tim van der Lippe c78a7193d7 Move ESTree types to acorn
Not every single ts_library invocation has (and should have) access
to the ESTree types. Therefore, re-export these types via Acorn,
which is the only user of these types.

This also improves the build performance, as we are no longer
rebuilding all of DevTools when these types change.

DISABLE_THIRD_PARTY_CHECK=Tsc cleanup
R=szuend@chromium.org

Bug: 1209844
Change-Id: Ib182ba4f7877d26eea844ac75180542ce2bac44a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2900444
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-18 05:24:23 +00:00
Tim van der Lippe 7330337eda Remove protocol definitions from global file
DISABLE_THIRD_PARTY_CHECK=Protocol removal
R=jacktfranklin@chromium.org

Fixed: 1208357
Change-Id: I7439947b8ee4573acc0baa930fc1a5b6018b082f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897519
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-17 13:18:32 +00:00
Tim van der Lippe 2f18159dd3 Fix error output of ts_library
With Python3, the return value of `process.communicate()` is a byte array.
We need to explicitly set `universal_newlines=True` to make sure
that the newlines correctly show up in the console output.

R=jacktfranklin@chromium.org

Fixed: 1208955
Change-Id: I8b162e3daf8b86bb0892c6b260a4ea2861b8337c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897278
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 11:15:09 +00:00
Tim van der Lippe a6d4a91d6d Remove protocol-proxy-api from global typescript definitions
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I2476ab25f75f7f8f1994d8846c2d82ed9dffef54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891760
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 10:53:18 +00:00
Tim van der Lippe 5bf64b9856 Make the Protocol definitions importable
Currently, all Protocol type definitions live on the global scope.
Additionally, the protocol files are included in all ts_library
targets. However, we don't want the protocol definitions to be
available in, for example, reusable UI components.

Therefore, we should move to a system where all files that want
to refer to the protocol types should import them instead.
However, doing so in 1 large CL will be problematic, which is
why it should be both globally available and importable as an
interim step.

To do so, we augment the existing protocol definitions to export
them as namespace and regular export. Then, we introduce a separate
file that imports the protocol types and augments the global scope
with the definitions. Now, protocol is both importable and remains
available on the global scope.

The reason that we need a separate file is that TypeScript disallows
you to augment the global scope in a file that also exports types.
Therefore, the global scope augmentation happens in protocol-globals.d.ts,
which will be removed once all Protocol type usages are imported.

To verify that this approach works, ProtocolClient imports the
required types, while SDK only imports it in AccessibilityModel.
All other files in SDK still refer to the global type.
In follow-up CLs, all pre-existing usages of Protocol will use
the import style.

DISABLE_THIRD_PARTY_CHECK=Updating protocol type format
R=szuend@chromium.org,jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I1d75949b9cd3e37989c6cddf79ac849f5664a1e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891756
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 09:48:18 +00:00
Simon Zünd e4da47f529 [ts] Add types for Intl.DisplayNames
This CL early adopts Intl types that haven't landed upstream in TS yet.

DISABLE_THIRD_PARTY_CHECK=Add types
R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: I2a2084a58212c535df9dc7ef4c0c704ede737df7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2885264
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-11 10:19:18 +00:00
Tim van der Lippe 7e60751cf7 Make incremental rebuilds work for ts_library()
Prior to the resources/inspector removal, we were having efficient
recompilations with GN. However, after the resources/inspector removal,
GN was excessively recompiling targets that don't require recompilation.

After an extensive investigation, we discovered that the root cause is
a discrepancy between what `tsc` determines to be a "new" file and when
Ninja does. Essentially, `tsc` uses content-based hashing to determine
freshness, whereas Ninja looks at file timestamps.

Therefore, if `tsc` generated the same output, `tsc` thought that nothing
had changed. However, `tsc` always writes the output, meaning that the
filestamps changed and then Ninja picked that up concluding "I need to
rerun dependent actions, as the output changed".

Therefore, we need to mimic what Ninja expects based on the file contents
of what `tsc` generates. To do so, we augment `ts_library` to obtain
any previously generated file content and store the corresponding file
timestamps. After `tsc` did its job, we compare the newly generated
content to the previous content. If we determine that they are equivalent,
we force-reset the timestamps of the files. This allows Ninja to conclude
that nothing has changed.

We do a similar fix for the generated `tsconfig.json`, but there we can
directly compare the newly generated configuration with the old configuration
and only perform the write if necessary.

The reason this improves incremental compilation is the fact that we split
up the implementation of a module with the entrypoint of a module. If you
make an implementation change in a module, the `ts_library` will have changed,
which means that it directs dependents will run. Since the only direct
dependent of a `devtools_module` is the corresponding `devtools_entrypoint`,
the `devtools_entrypoint` action will run. However, since the
`devtools_entrypoint` action will generate an equivalent public API, all
users of the entrypoint will not rebuild. Therefore, implementation-only
changes will now only cause recompilations of the module, but none of their
dependents.

R=aerotwist@chromium.org
CC=dpranke@google.com

Also-By: dpranke@google.com
Bug: 1139220
Change-Id: I9cafe33f92ce70fb638884b850c873987687d5a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2837838
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-04-20 13:30:14 +00:00
Simon Zünd 7787d5a052 [re-client] Update renamed config file variable
This fixes RE-Client building for DevTools.

Bug: chromium:1139220
Change-Id: Ib95221a8a13a13f362cea2ff3df07e84d93dd5dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2837840
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-20 11:50:35 +00:00
Tim van der Lippe f0a9176592 Fix deps in release mode for devtools_entrypoint
In release mode, the devtools_entrypoint prebundle step was missing
the deps. We ran into this issue when we were moving the emulation
panel into panels/emulation, which required some updates to the
toolbox.ts entrypoint (crrev.com/c/2782540).

The missing deps then required the rootdir logic to be changed,
such that deps are correctly resolved relative to the gen-directory,
not the source directory.

This CL might improve build performance in release builds, since
we are now properly using incremental references for our
entrypoints and saving a bit of compilation time.

DISABLE_THIRD_PARTY_CHECK=TypeScript fix
R=aerotwist@chromium.org

Bug: 1187573
Change-Id: I4662ac90ba50116cb668dfe3164fe725b74f9a37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782554
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-24 16:07:44 +00:00
Tim van der Lippe 459f40214e Run npm run install-deps on NPM 7.4.5
This CL contains the output of running `npm run install-deps` on
NPM 7.4.5. This includes a version bump of the package-lock.json,
which means all DevTools engineers who run `npm run install-deps`
should use NPM 7+. Additionally, this allows `npm run dedupe` to
produce a better output and remove more duplicate packages.
For more information, see https://github.com/eslint/eslint/issues/14098

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: Id1ca2f33f3bb7d555dca1c0737d38bc1c7f5221c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2705386
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-19 13:25:21 +00:00
Tim van der Lippe 30103efb6b Output build_release_applications in gen directory
All relevant build output files are now put into gen/front_end.
To make sure that we don't run into duplicate JS entrypoint
files, we have to turn of the emit of these targets in
front_end/BUILD.gn, such that build_release_applications can
put its output there. Since build_release_applications takes
the files from the front_end source directory, not the gen
directory, this causes no issues.

After this change, it is possible to use --custom-devtools-frontend
with gen/front_end rather than resources/inspector.

DISABLE_THIRD_PARTY_CHECK=Update TypeScript noemit
R=aerotwist@chromium.org

Bug: 1174013
Change-Id: Iad331ff0a28871a0ec297483fa03fbb485d05fb4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2672031
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-03 14:09:11 +00:00
Tim van der Lippe 07a40f89c1 Add reclient to gclient deps
If the `checkout_reclient` variable is set to True, `gclient sync` will
now pull in the reclient binaries that are used to perform remote
compilation of tsc invocations.

DISABLE_THIRD_PARTY_CHECK=Update TypeScript
R=szuend@chromium.org

Bug: 1139220
Change-Id: I83f6b95c49a3648081b5de3ddac315819d335c4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655895
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2021-02-01 15:38:47 +00:00
Simon Zünd ddeb15e4ee Reland "Support RBE for building TypeScript int DevTools"
This is a reland of 159d86d3fb

The reland fixes the setting of "use_rbe" on the ts_library template
iff RBE is enabled for devtools directly. This prevents an
"unused variable" error when building with "use_rbe=true" and
"devtools_use_rbe=false".

Original change's description:
> Support RBE for building TypeScript int DevTools
>
> This CL implements initial support for executing TSC in the cloud by:
>   1) Introducing a new GN arg "devtools_use_rbe". This is experimental
>      and will be folded into the Chromium "use_rbe" flag once RBE
>      building has stabalized.
>   2) Pass the configured Chromium rewrapper along to ts_library.py.
>   3) Add a new function "runTscRemote" that calculates inputs required
>      and invokes rewrapper
>
> Support is currently very limited:
>   - Only works with a full Chromium checkout (NOT standalone DevTools)
>   - Only works on leaf modules (modules without DEPS)
>
> Modules that can't be currently built in the Cloud are built locally
> as per usual.
>
> DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
>
> R=tvanderlippe@chromium.org
>
> Bug: chromium:1139220
> Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
Bug: chromium:1139220
Change-Id: I536fb580c3814a82525344ab5ebd5fb853568387
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2659015
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-29 12:55:33 +00:00
Ye Kuang fa8f4702f1 Revert "Support RBE for building TypeScript int DevTools"
This reverts commit 159d86d3fb.

Reason for revert:

This has broken a few re-client builders in Chromium:

* https://ci.chromium.org/p/chromium/builders/ci/Linux%20Builder%20%28reclient%29?limit=200
* https://ci.chromium.org/p/chromium/builders/ci/Linux%20Builder%20%28reclient%29

```
$ gn gen out/rbe-demo --args='use_rbe=true is_debug=false'
ERROR at //third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint.gni:132:19: Assignment had no effect.
        use_rbe = false
                  ^----
You set the variable "use_rbe" here and it was unused before it went
out of scope.
See //third_party/devtools-frontend/src/front_end/common/BUILD.gn:47:1: whence it was called.
```

Original change's description:
> Support RBE for building TypeScript int DevTools
>
> This CL implements initial support for executing TSC in the cloud by:
>   1) Introducing a new GN arg "devtools_use_rbe". This is experimental
>      and will be folded into the Chromium "use_rbe" flag once RBE
>      building has stabalized.
>   2) Pass the configured Chromium rewrapper along to ts_library.py.
>   3) Add a new function "runTscRemote" that calculates inputs required
>      and invokes rewrapper
>
> Support is currently very limited:
>   - Only works with a full Chromium checkout (NOT standalone DevTools)
>   - Only works on leaf modules (modules without DEPS)
>
> Modules that can't be currently built in the Cloud are built locally
> as per usual.
>
> DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
>
> R=​tvanderlippe@chromium.org
>
> Bug: chromium:1139220
> Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=szuend@chromium.org,tvanderlippe@chromium.org

Change-Id: Ie82249ab143f86bc61d706759b7b72c43ba4c53f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1139220
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2658258
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Ye Kuang <yekuang@google.com>
2021-01-29 03:15:16 +00:00
Simon Zünd 159d86d3fb Support RBE for building TypeScript int DevTools
This CL implements initial support for executing TSC in the cloud by:
  1) Introducing a new GN arg "devtools_use_rbe". This is experimental
     and will be folded into the Chromium "use_rbe" flag once RBE
     building has stabalized.
  2) Pass the configured Chromium rewrapper along to ts_library.py.
  3) Add a new function "runTscRemote" that calculates inputs required
     and invokes rewrapper

Support is currently very limited:
  - Only works with a full Chromium checkout (NOT standalone DevTools)
  - Only works on leaf modules (modules without DEPS)

Modules that can't be currently built in the Cloud are built locally
as per usual.

DISABLE_THIRD_PARTY_CHECK=Change typescript.gni

R=tvanderlippe@chromium.org

Bug: chromium:1139220
Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-28 12:18:47 +00:00
Simon Zünd 6d32fb19b0 [ts] Update TypeScript to 4.2.0-beta
TypeScript now ships type definitions for `ResizeObserver` so this
CL also removes the resize_observer.d.ts file and references to it
from build rules.

DISABLE_THIRD_PARTY_CHECK="TypeScript update"

R=tvanderlippe@chromium.org

Bug: chromium:1166169
Change-Id: I4dff6ed9aa4937f0183210cc735405cb2b8abaf6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626298
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-14 12:42:25 +00:00
Changhao Han 45bd77db91 TypeScriptify StylesSidebarPane.js: final part
DISABLE_THIRD_PARTY_CHECK=adding new TypeScript definition file

Bug: chromium:1011811, chromium:1093296
Change-Id: Ifb03cf74d98ab4c3aeba40bdce19051e85ffdd38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2544482
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-17 21:13:27 +00:00
Tim van der Lippe f52a8cf8e8 Use Node module resolution for tests
Our node tests run in the Node environment. As such, they already
include more type information, like Node, Mocha and Chai types.
However, it turns out that we did not update the moduleResolution
flag to enforce Node. Therefore, it was using the classic TypeScript
module resolution algorithm.

This wasn't a problem per se, as the classic algorithm will resolve
files in the same way as Node does. However, there is a slight
side-effect in that one of our `@types` we load references a type
that is specified in `@types/node`. The classic algorithm
erroneously traverses up the file tree to look for the filename,
in this case `stream`. If an engineer working on Chromium would
have a file called `stream.ts` in a parent directory of
`chromium/src`, then the classic algorithm would incorrectly resolve
to that file.

Instead, we should force the Node resolution algorithm, which
will not resolve to the `stream.ts` file, but will instead use
the types as defined in `@types/node`.

R=aerotwist@chromium.org

Fixed: 1135451
Bug: 1011811
Change-Id: I8ada319c923114f049f14fe38dcd8df82a9f2da8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461774
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-13 13:44:18 +00:00
Tim van der Lippe 58ceb60bf6 Move compiler options into tsconfig.base.json
These settings are the same for all ts_libraries. To make sure that
the configuration IDEs uses is the same as the ts_library uses,
let's move them into the tsconfig.base.json

DISABLE_THIRD_PARTY_CHECK=tsc update
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: Ia346620cd5b12c607b69bbae5bc9c83c1d56a3e6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2431511
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-28 13:03:22 +00:00
Tim van der Lippe 224a862b2f Typecheck network/NetworkLogView.js with TypeScript
This file was using `Headers` as iterable. This class is iterable,
but TypeScript didn't like it. As it turns out, there are multiple
definitions of the `dom` and `webworker` APIs. To get the iterable
versions, we have to add them explicitly. Therefore, also update
our TypeScript configuration to add the iterable variants.

DISABLE_THIRD_PARTY_CHECK=TypeScript fix
R=szuend@chromium.org

Bug: 1011811
Change-Id: Iae32bbf25d55346081dc2e0ab4f4093b531f91a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2421705
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-09-23 13:01:34 +00:00
Jack Franklin 4e556fa817 Copy sourcemaps into resources/inspector in is_debug mode.
This introduces the change that was reverted in https://crrev.com/c/2310810,
with the fix for the revert issue.

DISABLE_THIRD_PARTY_CHECK=ts library change

Change-Id: Ibf4e6e6167b8fce56c83afa7319389fa5520db38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2325215
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-07-29 15:36:14 +00:00
Brandon Goddard 55b591c650 Revert "Copy sourcemaps over in is_debug mode"
This reverts commit 9702c2c5dc.

Reason for revert: On Windows, this is failing to gn gen with is_debug = true with the following error: https://imgur.com/g3g4ADu

I bet the issue could be the source maps being copied over with fwd slash instead of os specific path separators


Original change's description:
> Copy sourcemaps over in is_debug mode
>
> DISABLE_THIRD_PARTY_CHECK=typescript library change
>
> Change-Id: I993b8a3c742cc7feea1ae1dee250aad7469eb22b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2302069
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=sigurds@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: I0e4c1b308beee837f6be1b2e642350656fb284d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2310810
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-07-21 19:03:55 +00:00
Jack Franklin 9702c2c5dc Copy sourcemaps over in is_debug mode
DISABLE_THIRD_PARTY_CHECK=typescript library change

Change-Id: I993b8a3c742cc7feea1ae1dee250aad7469eb22b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2302069
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-21 15:12:12 +00:00
Tim van der Lippe bb7978bb9e Update several @types packages
These @types packages were outdated. Additionally, make sure to
includes these files in the `typescript.gni`, to cause TSC to
rerun whenever they change.

DISABLE_THIRD_PARTY_CHECK=NPM updates
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: Idce2ec5d48e280c56b496599b56d5cc4c30df404
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297397
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-15 10:01:04 +00:00
Tim van der Lippe 52c8c76899 TypeCheck formatter_worker/FormatterWorker.js with TypeScript
Required changes:
- Add CodeMirror types as globals
- Add support for `is_web_worker` in `ts_library` and
`devtools_module`, as the FormatterWorker is a worker. This
also moves the `lib` specification out of `tsconfig.base.json`,
as we now need to dynamically generate it
- Fix (seemingly unrelated) issues with untyped events in other
files. I don't understand why TSC suddenly started to complain
about these.

DISABLE_THIRD_PARTY_CHECK=TypeScript fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1098730
Change-Id: I7d33c22983f2fe5e793c20fa5d56411d996ec999
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2294985
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-14 10:07:30 +00:00
Tim van der Lippe 98a014f2e1 Migrate IdentityFormatter to TypeScript
This introduces the first TypeScript-authored file that also makes
use of TypeScript features. To do so, we have to perform several steps:

1. Move the `formatter_worker` typescript files into a new template called
`devtools_module`. This template takes care of running TypeScript and
copying the files it generates to `resources/inspector`. (The latter can
be removed when we are in a position to do so)
2. Move the files out of `all_devtools_modules` into (yet another) GN variable.
We should clean this up by using the `grd_file_group`, which is possible
with an integration with `devtools_module`. However, for simplicity's sake
I decided to fix that in a follow-up. The integration of `devtools_module`
with the GRD action script would then finally allow us to remove the duplication
of all of these file strings in multiple places.
3. To make sure that the buildgraph remains intact, we have to perform
the copy-step after the typescript-step. However, this means we need to use
a different name than `target_name` for the typescript compilation. We run
into issues there, as the project references assume that the names are the
full folder names (e.g. `../formatter_worker`). If we would then use a different
name for the `ts_library` action, then we generate a `tsconfig.json` with
the wrong name. To counteract that, introduce a (temporary)
`typescript_config_name` where we can explicitly set the name of the `tsconfig.json`
that we generate. This is not ideal and I am still thinking of a better
alternative, but haven't figured out a solution yet.

DISABLE_THIRD_PARTY_CHECK=Typescript fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1098730
Change-Id: I1457067845cdedbc7d4ce6a80c12d7943b67087c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282809
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-07 10:28:17 +00:00
Tim van der Lippe 60421845f4 Implement devtools_entrypoint
Port formatter_worker to use devtools_entrypoint, which is the abstraction
around `rollup`. It handles the creation of the rollup bundle, but leaves
it alone if you are building with `is_debug=true`. This way, we can keep
development use the existing workflow where individual files are fetched,
while in release mode we bundle the entrypoint into 1 big file.

In the future, anything we consider an entrypoint must use this method.
This would include third_party packages like lit-html and CodeMirror.
A follow-up CL will move the lit-html entrypoint back into
third_party/lit-html, as we no longer require it to be a direct subfolder
of `front_end/` (that was fixed in
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2270168)

DISABLE_THIRD_PARTY_CHECK=TypeScript fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1098730
Change-Id: I5d2e67cc9c71291e8b67bbc29354e75239aae9a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2267001
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-02 10:08:19 +00:00
Tim van der Lippe d7344b14b3 Reland "Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end"""
This is a reland of d274209d78

Original change's description:
> Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
>
> This reverts commit 786fb877e8.
>
> Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
> no longer includes DevTools frontend in the Android build, fixing the issue
> where Android was including DevTools frontend twice.
>
> Original change's description:
> > Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> >
> > This reverts commit dbb8f31857.
> >
> > Reason for revert: suspected cause of build breakage downstream:
> > https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
> >
> > Original change's description:
> > > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> > >
> > > This is a reland of 9f16ccc6a1
> > >
> > > Original change's description:
> > > > Add rollup_entrypoint to rollup entrypoints in front_end
> > > >
> > > > To support lit-html in a release build, we have to run rollup
> > > > separately. Since lit-html source code is targeted to TypeScript,
> > > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > > file.
> > > >
> > > > This means that we can't use `build_release_applications.py` to rollup
> > > > this file (this is by design). Instead, we introduce a new
> > > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > > write a special Python file, as we can reuse `node.py` for this, which
> > > > is essentially a pipe-through with a pinned version of Node.
> > > >
> > > > While the rollup build works, for debug builds we are still missing
> > > > the `front_end/third_party/lit-html` files. We will address that
> > > > in a follow-up CL, once we introduce the first usage of lit-html
> > > > in the codebase.
> > > >
> > > > We are going to need to make more changes to Rollup later (most notably
> > > > the external files check), but since we aren't using this codepath
> > > > in `build_release_applications.py`, I will fix that in a separate CL.
> > > >
> > > > To reduce duplication in the Ninja build system, I also extract
> > > > a vars.gni file that has the relevant variables. These are currently
> > > > used in the rollup.gni and typescript.gni.
> > > >
> > > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > > the stdout. In Ninja, we should only print to stdout if there is
> > > > an error.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > > >
> > > > Bug: 1011811, 1061037
> > > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > >
> > > Bug: 1011811, 1061037, 1096473
> > > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
> >
> > Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1011811, 1061037, 1096473
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
>
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
>
> Bug: 1011811, 1061037, 1096473
> Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I908a5d923e0a874af372793a74a92e9873d5c07e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2273186
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 15:53:23 +00:00
Tim van der Lippe b892cf3ca6 Revert "Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end"""
This reverts commit d274209d78.

Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8876155005776684608/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> 
> This reverts commit 786fb877e8.
> 
> Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
> no longer includes DevTools frontend in the Android build, fixing the issue
> where Android was including DevTools frontend twice.
> 
> Original change's description:
> > Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> >
> > This reverts commit dbb8f31857.
> >
> > Reason for revert: suspected cause of build breakage downstream:
> > https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
> >
> > Original change's description:
> > > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> > >
> > > This is a reland of 9f16ccc6a1
> > >
> > > Original change's description:
> > > > Add rollup_entrypoint to rollup entrypoints in front_end
> > > >
> > > > To support lit-html in a release build, we have to run rollup
> > > > separately. Since lit-html source code is targeted to TypeScript,
> > > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > > file.
> > > >
> > > > This means that we can't use `build_release_applications.py` to rollup
> > > > this file (this is by design). Instead, we introduce a new
> > > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > > write a special Python file, as we can reuse `node.py` for this, which
> > > > is essentially a pipe-through with a pinned version of Node.
> > > >
> > > > While the rollup build works, for debug builds we are still missing
> > > > the `front_end/third_party/lit-html` files. We will address that
> > > > in a follow-up CL, once we introduce the first usage of lit-html
> > > > in the codebase.
> > > >
> > > > We are going to need to make more changes to Rollup later (most notably
> > > > the external files check), but since we aren't using this codepath
> > > > in `build_release_applications.py`, I will fix that in a separate CL.
> > > >
> > > > To reduce duplication in the Ninja build system, I also extract
> > > > a vars.gni file that has the relevant variables. These are currently
> > > > used in the rollup.gni and typescript.gni.
> > > >
> > > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > > the stdout. In Ninja, we should only print to stdout if there is
> > > > an error.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > > >
> > > > Bug: 1011811, 1061037
> > > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > >
> > > Bug: 1011811, 1061037, 1096473
> > > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
> >
> > Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1011811, 1061037, 1096473
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> 
> Bug: 1011811, 1061037, 1096473
> Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>

TBR=caseq@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: I9350b612f8a220fdd9c15eee6e63185e2dcc2850
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037, 1096473
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2273183
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 13:49:04 +00:00
Tim van der Lippe d274209d78 Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
This reverts commit 786fb877e8.

Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
no longer includes DevTools frontend in the Android build, fixing the issue
where Android was including DevTools frontend twice.

Original change's description:
> Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
>
> This reverts commit dbb8f31857.
>
> Reason for revert: suspected cause of build breakage downstream:
> https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
>
> Original change's description:
> > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> >
> > This is a reland of 9f16ccc6a1
> >
> > Original change's description:
> > > Add rollup_entrypoint to rollup entrypoints in front_end
> > >
> > > To support lit-html in a release build, we have to run rollup
> > > separately. Since lit-html source code is targeted to TypeScript,
> > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > file.
> > >
> > > This means that we can't use `build_release_applications.py` to rollup
> > > this file (this is by design). Instead, we introduce a new
> > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > write a special Python file, as we can reuse `node.py` for this, which
> > > is essentially a pipe-through with a pinned version of Node.
> > >
> > > While the rollup build works, for debug builds we are still missing
> > > the `front_end/third_party/lit-html` files. We will address that
> > > in a follow-up CL, once we introduce the first usage of lit-html
> > > in the codebase.
> > >
> > > We are going to need to make more changes to Rollup later (most notably
> > > the external files check), but since we aren't using this codepath
> > > in `build_release_applications.py`, I will fix that in a separate CL.
> > >
> > > To reduce duplication in the Ninja build system, I also extract
> > > a vars.gni file that has the relevant variables. These are currently
> > > used in the rollup.gni and typescript.gni.
> > >
> > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > the stdout. In Ninja, we should only print to stdout if there is
> > > an error.
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > >
> > > Bug: 1011811, 1061037
> > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> >
> > Bug: 1011811, 1061037, 1096473
> > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811, 1061037, 1096473
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> Commit-Queue: Andrey Kosyakov <caseq@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2020-06-29 12:43:32 +00:00
Tim van der Lippe 2b7d669ecc Typecheck formatter_worker/ESTreeWalker.js with TypeScript
DISABLE_THIRD_PARTY_CHECK=Add ESTree types to TypeScript
R=bmeurer@chromium.org

Bug: 1011811, 1098730
Change-Id: Iab3b63d98ef6f8d035568e393fa24140d7f17931
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2264120
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-25 11:41:42 +00:00
Andrey Kosyakov 786fb877e8 Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
This reverts commit dbb8f31857.

Reason for revert: suspected cause of build breakage downstream:
https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab

Original change's description:
> Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> 
> This is a reland of 9f16ccc6a1
> 
> Original change's description:
> > Add rollup_entrypoint to rollup entrypoints in front_end
> >
> > To support lit-html in a release build, we have to run rollup
> > separately. Since lit-html source code is targeted to TypeScript,
> > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > file.
> >
> > This means that we can't use `build_release_applications.py` to rollup
> > this file (this is by design). Instead, we introduce a new
> > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > write a special Python file, as we can reuse `node.py` for this, which
> > is essentially a pipe-through with a pinned version of Node.
> >
> > While the rollup build works, for debug builds we are still missing
> > the `front_end/third_party/lit-html` files. We will address that
> > in a follow-up CL, once we introduce the first usage of lit-html
> > in the codebase.
> >
> > We are going to need to make more changes to Rollup later (most notably
> > the external files check), but since we aren't using this codepath
> > in `build_release_applications.py`, I will fix that in a separate CL.
> >
> > To reduce duplication in the Ninja build system, I also extract
> > a vars.gni file that has the relevant variables. These are currently
> > used in the rollup.gni and typescript.gni.
> >
> > Lastly, I had to fix node.py to make sure it wouldn't always print
> > the stdout. In Ninja, we should only print to stdout if there is
> > an error.
> >
> > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> >
> > Bug: 1011811, 1061037
> > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> 
> Bug: 1011811, 1061037, 1096473
> Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037, 1096473
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
2020-06-22 17:49:05 +00:00
Tim van der Lippe dbb8f31857 Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
This is a reland of 9f16ccc6a1

Original change's description:
> Add rollup_entrypoint to rollup entrypoints in front_end
>
> To support lit-html in a release build, we have to run rollup
> separately. Since lit-html source code is targeted to TypeScript,
> the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> file.
>
> This means that we can't use `build_release_applications.py` to rollup
> this file (this is by design). Instead, we introduce a new
> `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> write a special Python file, as we can reuse `node.py` for this, which
> is essentially a pipe-through with a pinned version of Node.
>
> While the rollup build works, for debug builds we are still missing
> the `front_end/third_party/lit-html` files. We will address that
> in a follow-up CL, once we introduce the first usage of lit-html
> in the codebase.
>
> We are going to need to make more changes to Rollup later (most notably
> the external files check), but since we aren't using this codepath
> in `build_release_applications.py`, I will fix that in a separate CL.
>
> To reduce duplication in the Ninja build system, I also extract
> a vars.gni file that has the relevant variables. These are currently
> used in the rollup.gni and typescript.gni.
>
> Lastly, I had to fix node.py to make sure it wouldn't always print
> the stdout. In Ninja, we should only print to stdout if there is
> an error.
>
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> R=jacktfranklin@chromium.org,aerotwist@chromium.org
>
> Bug: 1011811, 1061037
> Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-22 13:04:33 +00:00
Tim van der Lippe 931cc8450e Revert "Add rollup_entrypoint to rollup entrypoints in front_end"
This reverts commit 9f16ccc6a1.

Reason for revert: Fails in Chromium roll: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8877691983703106912/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Add rollup_entrypoint to rollup entrypoints in front_end
> 
> To support lit-html in a release build, we have to run rollup
> separately. Since lit-html source code is targeted to TypeScript,
> the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> file.
> 
> This means that we can't use `build_release_applications.py` to rollup
> this file (this is by design). Instead, we introduce a new
> `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> write a special Python file, as we can reuse `node.py` for this, which
> is essentially a pipe-through with a pinned version of Node.
> 
> While the rollup build works, for debug builds we are still missing
> the `front_end/third_party/lit-html` files. We will address that
> in a follow-up CL, once we introduce the first usage of lit-html
> in the codebase.
> 
> We are going to need to make more changes to Rollup later (most notably
> the external files check), but since we aren't using this codepath
> in `build_release_applications.py`, I will fix that in a separate CL.
> 
> To reduce duplication in the Ninja build system, I also extract
> a vars.gni file that has the relevant variables. These are currently
> used in the rollup.gni and typescript.gni.
> 
> Lastly, I had to fix node.py to make sure it wouldn't always print
> the stdout. In Ninja, we should only print to stdout if there is
> an error.
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> 
> Bug: 1011811, 1061037
> Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: Ida2a1e30d601e87f64a7c35bbc527c700d9cbe70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2243175
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 14:48:09 +00:00
Tim van der Lippe 9f16ccc6a1 Add rollup_entrypoint to rollup entrypoints in front_end
To support lit-html in a release build, we have to run rollup
separately. Since lit-html source code is targeted to TypeScript,
the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
file.

This means that we can't use `build_release_applications.py` to rollup
this file (this is by design). Instead, we introduce a new
`rollup_entrypoint` Ninja target that calls Rollup. We don't have to
write a special Python file, as we can reuse `node.py` for this, which
is essentially a pipe-through with a pinned version of Node.

While the rollup build works, for debug builds we are still missing
the `front_end/third_party/lit-html` files. We will address that
in a follow-up CL, once we introduce the first usage of lit-html
in the codebase.

We are going to need to make more changes to Rollup later (most notably
the external files check), but since we aren't using this codepath
in `build_release_applications.py`, I will fix that in a separate CL.

To reduce duplication in the Ninja build system, I also extract
a vars.gni file that has the relevant variables. These are currently
used in the rollup.gni and typescript.gni.

Lastly, I had to fix node.py to make sure it wouldn't always print
the stdout. In Ninja, we should only print to stdout if there is
an error.

DISABLE_THIRD_PARTY_CHECK=Ninja fixes
R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1011811, 1061037
Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 13:09:06 +00:00