The previous attempt of this fix was in https://crrev.com/c/2687497
That CL was reverted, as it inadvertently added more files to the
runtime_deps then was intended. Most notably, it erroneously included
`tsconfig.json`, `tsbuildinfo` and `d.ts` files.
Instead, we should manually filter out only those files that we are
interested in. In this case, these are the `js` and `js.map` files.
Once these are added to the runtime_deps, the layout tests can access
them, as they are pushed to the bots.
I have verified that the following command shows the expected output:
gn desc out/Default front_end/platform:bundle runtime_deps
R=jacktfranklin@chromium.org
Bug: 1174013
Change-Id: I6bc25665f06b5968bbd9748696a5723edac84ddc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2697201
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>
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>
Sometimes in devtools we want to take a file directly from sources into
the `resources/inspector` folder, and other times we want to move files
from `out/Default/gen` into `resources/inspector`. Rather than have one
command for both of these and do nasty path wrangling to put the files
in exactly the right place, we instead split them into two templates.
This is nasty but our hope is we can hide this complexity behind other
templates that most people will use; this shouldn't be used directly by
people very often.
Change-Id: I3e7acbbed0c6d1bb8ad69a62cbe7341ad856d98b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2287517
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
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>