Commit Graph
15 Commits
Author SHA1 Message Date
Tim van der Lippe b391dcebc9 Add files generated in gen/front_end to runtime_deps
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>
2021-02-16 15:53:01 +00:00
Tim van der Lippe 7f3180d06d Revert "Add data_deps for ts_library invocations"
This reverts commit 8cf3e61f27.

Reason for revert: Potential suspect for Deterministic Linux builder failurs: https://ci.chromium.org/ui/p/chromium/builders/ci/Deterministic%20Linux/30226/overview

Original change's description:
> Add data_deps for ts_library invocations
>
> Since we are switching over to using `gen/front_end` as the build
> output directory, we need to make sure that these files are included
> as data_deps for the bots. If we don't include these, then the bots
> will not be able to retrieve those files to run the layout tests.
>
> This is required to land https://crrev.com/c/2684274 where we will
> be switching away from resources/inspector to gen/front_end.
>
> R=​jacktfranklin@chromium.org
>
> Bug: 1174013
> Change-Id: I648fe296faea0edb23d4c47af837a9a2e21c2c5a
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2687497
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I2874ed9c7ffb05d75d42769c044b2c670d29afdc
No-Tree-Checks: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2690335
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-02-11 15:54:38 +00:00
Tim van der Lippe 8cf3e61f27 Add data_deps for ts_library invocations
Since we are switching over to using `gen/front_end` as the build
output directory, we need to make sure that these files are included
as data_deps for the bots. If we don't include these, then the bots
will not be able to retrieve those files to run the layout tests.

This is required to land https://crrev.com/c/2684274 where we will
be switching away from resources/inspector to gen/front_end.

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I648fe296faea0edb23d4c47af837a9a2e21c2c5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2687497
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-10 15:44:46 +00:00
Tim van der Lippe 59ff4e28de Move worker integration into entrypoint for wasmparser_worker
This allows us to test the wasmparser_worker implementation
in isolation in unit tests, while extracting out the worker
integration into a separate file. A follow-up CL will migrate
the wasmparser_worker to use URL-based worker construction,
which will allow us to remove the wasmparser_worker-entrypoint
in front_end/ and cleanup the RuntimeInstantiator.js logic.

R=jacktfranklin@chromium.org,bmeurer@chromium.org

Bug: 1009443
Change-Id: I77d04ab870b38ec9f9209c1a156c123c941d169b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581927
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-12-10 10:21:28 +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
Jan Scheffler f3277b2ec7 Add _sources suffix to ensure sorting in .gni files
This cl adds a _sources suffix to make sure files are sorted in
all_devtools_modules.gni and devtools_module_entrypoints.gni
[see: https://gn.googlesource.com/gn/+/master/src/gn/command_format.cc#386]


Change-Id: I21962895f7b72f1052c89b30cefdc843f7b36624
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2318263
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-07-28 11:53:11 +00:00
Simon Zünd 94beb690c0 Use 'forward_variables_from' in 'devtools_module'
This CL changes 'devtools_module' to use the standard way of
copying properties from the invoker. Not all devtools_module will
provide 'deps'. The current code assumes its always there, so modules
have to provide an empty deps list, otherwise we get build errors.

R=jacktfranklin@chromium.org

Change-Id: I49fd82ab1e54816c02fb99eccb70287d845b8233
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2310457
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-07-22 13:23:30 +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
Paul Lewis 1213aa4256 Asserts that all devtools_module files are listed in all_typescript_modules
Bug: 1105861
Change-Id: I1e23ec3912ce4e8c591033d3f5223ec52e5c430c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2302075
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-16 15:41:41 +00:00
Tim van der Lippe ced0044c7c Make devtools_module only visible to same-file targets
This prevents other targets to depend on a `devtools_module` where
they should have depended on the `devtools_entrypoint` instead.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: Id92b1871a805c30ed9b45a448ce3181adf7f7da9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2302073
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-16 15:08:01 +00:00
Tim van der Lippe 312069a404 Introduce devtools_pre_built
This template makes sure that the sources are copied both to gen
and the resources/inspector folder

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1101738
Change-Id: Ic6b9c52845abafad45cacf76565c7c3721ec3935
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2297479
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-14 13:37:56 +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
Jack Franklin 4bf640308b Create {copy_sources,copy_gen}_to_resources gni helpers
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>
2020-07-13 09:01:49 +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