Commit Graph
189 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 4374b66f2c Remove front_end/toolbox.json
Since all of its modules are removed, we can now remove toolbox
as an entrypoint from build_release_applications and build it
with `devtools_entrypoint`. There was one catch: the copy logic
we use as part of `devtools_entrypoint` was wrong and required
us to remove the trailing slash, since `front_end/toolbox.js` isn't
in a subdirectory.

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

Bug: 1127902
Change-Id: Ie8b47a5ceae66c8e6b607794d564d17dc6d1e3af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678083
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-05 14:37:29 +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
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
Tim van der Lippe a1ee70e85e Fix node action sources
When rewriting the actions that use Node to node_action,
we missed the "sources" to be forwarded to the action.
This means that a change to a source file does not properly
trigger a rebuild in GN, as GN doesn't understand it
is a source file.

R=jacktfranklin@chromium.org

Bug: None
Change-Id: I0313c6007a83417e1cc5566ae6d9bc379c17b337
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2653086
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-01-27 18:08:55 +00:00
Tim van der Lippe 7988ab3e62 Introduce GN node_action template
This template abstracts away from the `node.py` script, as well as
making sure that the JS script is properly added to the inputs
array. Before, it was easy to forget to add the JS script to the
inputs array, which can lead to GN incorrectly determining there
is no need to rebuild, while in fact the script itself changed.

R=szuend@chromium.org

Bug: 1170706
Change-Id: I759f3ef3088381ea7e4cefcb8524d7d240b46fb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2650148
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-01-27 12:08:04 +00:00
Bruce Dawson 4239530627 Skip GRD compression in debug builds
GRD compression takes a while. It takes a particularly long while in
debug builds. This change skips compression on debug builds which
takes the GRD step from ~55 seconds to ~5 seconds.

Alternately we could use this framework (passing through the debug state
of the build) to try different compression options as suggested in the
bug.

Test results for debug-component and release builds with this change:
  5.2 weighted s to build gen/content/browser/devtools/devtools_resources_grit.d.stamp, gen... (5.2 s elapsed time)
  24.5 weighted s to build gen/content/browser/devtools/devtools_resources_grit.d.stamp, gen... (24.5 s elapsed time)

Release is unchanged but debug is ~11 times faster.

Bug: 1162467
Change-Id: I017ec872a1645fef55aff09472cdf4427146d17b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2639276
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-01-26 17:46:46 +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
Tim van der Lippe 677a98d1c4 Remove component_docs from GRD
These files are not intended to be included in the DevTools release
bundle and therefore should be treated as testonly. This also means
that we should be using `ts_library` instead of `devtools_module`,
as we don't intend to copy these files into `resources/inspector`.

R=jacktfranklin@chromium.org

Fixed: 1152777
Change-Id: Id23d403c64445dd1c0ea59e36117dfc667f7e8e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2617796
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-01-08 16:09:47 +00:00
Mathias Bynens 2e8ddd343b Include .avif and .webp images in *.grd files
Otherwise, AVIF and WebP images get silently excluded.

Bug: chromium:1161667
Change-Id: Id5cc515a532d1d6033f4bc417b98ff9840a2c741
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612852
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2021-01-07 15:12:16 +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
Tim van der Lippe 8e12f92229 Use Python version bundled with depot_tools for all scripts
depot_tools ships a "vpython" binary that is added to the $PATH
for all Chromium engineers. This binary is versioned by depot_tools
which we roll in ourselves as part of `gclient sync`.

By using `vpython` instead of `python`, we are no longer depended
on the Python version installed locally and instead use the version
we pull in from DEPS.

R=liviurau@chromium.org

Change-Id: If49a54c24b6cf129ff843cd9ca1140a723a78afb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571462
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-04 14:08:59 +00:00
Tim van der Lippe d18c704c60 Cleanup devtools_module_entrypoints.gni
Both front_end_devtools_module_entrypoint_sources and
generated_devtools_module_entrypoint_sources were unused, since
the `devtools_entrypoint` migration has finished.

Secondly, we can rename generated_typescript_entrypoint_sources to
generated_module_entrypoint_sources, since we no longer need to
distinguish between JavaScript and TypeScript entrypoints.

Lastly, we can clean up the definition of
devtools_module_entrypoint_sources to no longer include the
$resources_out_dir line, which saves some duplication.

R=aerotwist@chromium.org

Change-Id: I1a327cf40cec6630b3be7ac53e2c87f7e179c895
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566802
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>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-03 11:43:03 +00:00
Sigurd Schneider 66497ccc5f Generate inlined enums for protocol events in Protocol.<domain>
Previously, only inlined enums for commands were generated. This allows
several twin definitions to be removed from the front-end code, easing
the maintainance burdon of having to keep them in sync. See e.g.
https://crrev.com/c/2562339

Change-Id: I48ad1082ae8ecd3a657f61530e1795c61792ac56
Bug: chromium:1153099
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562338
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-26 14:39:54 +00:00
Tim van der Lippe 7dcef88d8b Remove skip_compilation from module.json files
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I4c4fd280adb4f5f7b327239d08d80b2cb98b203b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560248
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-25 13:19:08 +00:00
Tim van der Lippe 16534e267d Remove Python infrastructure for the Closure Compiler
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I2ae75adec9fc47eedc410b4f066342ed3fb0a136
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560245
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-11-25 12:39:37 +00:00
Benedikt Meurer 1ca30ea08a [refactor] Remove orphaned generate_devtools_extension_api.
This was generating devtools_extension_api.js file, which was clearly
broken, and unused.

Bug: chromium:1011811
Change-Id: I2981e681e7a3ee34732f4c0d61e8dee8554604df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2550073
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-19 16:22:18 +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 3387bd4064 Move startup files to GN
There previously were two special files that were handled
by `build_release_applications`: root.js and RuntimeInstantiator.js.
Both files are explicitly part of the startup process of DevTools
and its various entrypoints.

To remove the copying from `build_release_applications`, we have
to move these to the relevant `devtools_entrypoint`. Since a
`devtools_entrypoints` bundles all subdirectories, we can't keep
these files in `front_end/` directly. Instead, we move these files
to `startup/` to denote their special-casing in the startup process.

Next to that, we have to fix all usages of these files in the entrypoints.
For all JavaScript entrypoint files, all side-effect legacy files
that are loaded by `startup.js` (previously known as `root.js` and renamed
to prevent confusion with the `root/` module) are removed. All
"additional" legacy files that a particular entrypoint requires are
still loaded as-is.

The RuntimeInstantiator is moved to become an implementation detail
of `startup/`. Therefore, all of the usages that were previously
importing from `RuntimeInstantiator` now import via `startup.js`.

In the end, the special-casing of these files are removed and renamed
for clarity. In the future, we want to remove the complicated
entrypoints startup process, but we are not ready for that yet.
That will require additional cleanups with `resources` in `module.json`
before that change can happen.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I198d5a62d2aab70f842c68d9b4c0871fde1587a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485072
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 12:55:34 +00:00
Tim van der Lippe 3c7eedcd60 Remove all definitions of usesObjectNotation
This was a temporary method, used during the migration to use
objects in dispatcher callbacks. Since all dispatchers now receive
the event as an object, we can remove these temporary methods.

R=aerotwist@chromium.org

Fixed: 1138492
Bug: 1011811
Change-Id: Ib7fbfae567ebc9b2be0a5d760458e5b0c7edc12e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484723
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 10:59:51 +00:00
Tim van der Lippe d5a0a4c418 Remove rollup_module from build_release_applications
This method is now unused, as all legacy files are copied by GN.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Ibf74a1ed7752ffb2c38689af71c754242fce2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484715
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-19 16:05:34 +00:00
Tim van der Lippe 150eadfde2 Remove Dispatcher protocol types
These were the old Dispatcher types that were using the exploded
argument method definitions. Since all dispatchers have been
migrated to `ProtocolProxyApi`, we can remove the types from Closure.

R=aerotwist@chromium.org

Bug: 1138492, 1011811
Change-Id: Ic0e19c3e5166d60fbc86d5df9dab28a294e8feba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484721
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-19 16:03:04 +00:00
Tim van der Lippe 8fa9d45123 Build common-legacy.js with devtools_entrypoint
To continue to move away from `build_release_applications.py`, move
building `common-legacy.js` into `devtools_entrypoint`. In the end,
it will allow us to remove `_rollup_module` from
`build_release_applications.py`.

The logic in `build_release_applications.py` is updated to assume
a pregenerated `-legacy.js` file based on the `pre_generates_legacy`
option in the `module.json` file. Once all `-legacy.js are migrated,
we can remove this option once again.

To make sure that we Rollup properly, we should assume that an
entrypoint in the same folder is regarded as external. Otherwise,
we would rollup the contents of `common.js` into `common-legacy.js`,
which is not what we want.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Idcda3e1c2436a0bebb36501523c8d586d6e86fac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2450297
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-14 11:42:10 +00:00
Tim van der Lippe 67c4ae8e03 Only include legacy file into _module.js bundle if required
For all `_module.js` files, we currently copy all `modules` into
the `module.json` metadata. However, since then the Runtime got
updated to always load the entrypoint. This is possible, because
in release modes only the entrypoint exists and all other files
are removed.

Therefore, we can use an empty array to denote that solely the
entrypoint should be loaded by the Runtime. If however the module
has a legacy file, the Runtime needs to load that instead. (See
`Runtime._loadModules` for more information) Therefore, include
solely the legacy file to the metadata information in the
`_module.js` to load it.

Eventually, this will allow us to remove the files from the modules
array in the `module.json`, as only Closure would require that
information.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Ie14bd55b29b356a39aad7e8ca2041c979bd1b2cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461783
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-14 08:58:50 +00:00
Dirk Pranke 75443e831f Python3-related fixes for the devtools build.
This CL addresses a few issues that will help make it possible
to build Chromium using Python 3.

Nothing in this CL should cause any functional changes, and
Python 3 is not required (indeed, won't even work yet), but
this CL will be needed to unblock other work.

See https://crrev.com/c/2333868 for the roll-up Chromium patch,
which also has multiple other dependencies.

Bug: 1112471
Change-Id: Ica8a5b2b24674e1abd267bcd558b7101a6da6fc5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2330718
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
2020-10-03 17:14:03 +00:00
Tim van der Lippe 3aa84724e0 Remove scripts support from module.json
This removes all references to and declarations of the scripts array
as defined in the module.json files.

R=aerotwist@chromium.org

Fixed: 1105476

Change-Id: I8edcebb5a527c235c606f79283adf5c977a47886
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416513
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-09-22 11:44:35 +00:00
Yuke Liao 2a275e45bf Make devtools work for non-default toolchains
This CL makes devtools work for non-default toolchains.

Bug: 1129223
Change-Id: I9cc201e1cfc66bbd0d3695543d7f63f5974b66b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2419795
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
2020-09-21 17:12:23 +00:00
Tim van der Lippe 73a80d4976 Move message handling of worker into formatter_worker.ts
Since formatter_worker.ts is the actual entrypoint for the worker,
we should perform the message handling and postMessage invocations
there. This allows us to remove accesses to the `self.postMessage`
global in the implementation of the parsers and formatters, allowing
proper unit testing. Note all `self.postMessage`s have been removed,
as that requires additional refactoring in a follow-up CL.

This also paves the way for removing `formatter_worker_entrypoint`,
which is currently a no-op file. That requires additional infrastructure
changes to `Common.Worker` to allow specify a subfolder of `front_end/`
to be passed as the entrypoint.

Note that this CL also removes the `parseSCSS` method, which appears to
be unused in both the Chromium codebase as well as externally. Testing
on stable shows that we are currently not formatting `.scss` files
anyways.

R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I808c5ea83efa5ec9fed6bd1aec2418487f553848
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410232
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-21 16:52:43 +00:00
Tim van der Lippe f5feb1fec6 Reland "Reland "Remove support for remote modules""
This reverts commit 862107080d.

Reason for revert: Chromium build issue fixed.

Original change's description:
> Revert "Reland "Remove support for remote modules""
> 
> This reverts commit b3859e8d65.
> 
> Reason for revert: Breaking roll (https://ci.chromium.org/p/chromium/builders/ci/win-archive-rel/17700)
> 
> Original change's description:
> > Reland "Remove support for remote modules"
> > 
> > This reverts commit d5044ddf05.
> > 
> > Reason for revert: Fixed Chromium debug issue.
> > 
> > Original change's description:
> > > Revert "Remove support for remote modules"
> > > 
> > > This reverts commit 419c91eff6.
> > > 
> > > Reason for revert: Breaks roll https://chromium-review.googlesource.com/c/chromium/src/+/2416805
> > > 
> > > Original change's description:
> > > > Remove support for remote modules
> > > > 
> > > > LightHouse is currently broken in Canary, because of problems with
> > > > the appspot server. This isn't the first occurrence of this problem
> > > > and it becomes increasingly more difficult to figure out why the
> > > > server keeps on breaking. This is combined with a large infrastructure
> > > > cost of supporting remote modules and a confusing debugging experience
> > > > when working with it locally.
> > > > 
> > > > The reason we had remote modules was the fact that these modules are
> > > > too large to be included in the Chromium bundle. In the last months,
> > > > we have made numerous remote modules bundled, by applying minifications
> > > > and optimizations to each module.
> > > > 
> > > > The remaining remote module that we are currently shipping is LightHouse.
> > > > Since the remote appspot server is broken and unlikely to be fixed
> > > > anytime soon, now is the best time to finally resolve the remote
> > > > modules question.
> > > > 
> > > > Therefore, we remove support for remote modules from the `module.json`
> > > > files and `Runtime.js`. Additionally, we update the build system
> > > > to properly generate the required files and load them via ES modules.
> > > > 
> > > > We will be able to perform subsequent cleanups in the Runtime to remove
> > > > more infrastructure related to scripts/remote modules, but given that
> > > > this CL is already quite large we are doing that in a follow-up CL.
> > > > 
> > > > Follow-up action items for the LightHouse folks are to further decrease
> > > > the bundle size for LightHouse. Since we are now loading it via ES
> > > > modules, we can now use ES imports in the `devtools-dt-bundle.js` as
> > > > well. This allows us to remove the copy of the SDK files, as well as
> > > > make use of proper ES exports, rather than the browserified requires.
> > > > 
> > > > R=​aerotwist@chromium.org,yangguo@chromium.org,paulirish@chromium.org
> > > > 
> > > > Fixed: 1128890
> > > > Change-Id: Ib4271a8064b18d31b75d9e28dbe5e3cb3c77d7ff
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416511
> > > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > > 
> > > TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
> > > 
> > > Change-Id: I9d3da08108a35d7dadeefd526ea9dbd562ad3432
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416519
> > > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> > > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> > 
> > Change-Id: I26bf0565297c8e167039362b30109d7020bbca56
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2418431
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> 
> TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,alexrudenko@chromium.org
> 
> Change-Id: I0ed24d32c9b68bc4cb8026f6fc362540800beeb0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2418408
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

Change-Id: I8718e9d94c384a13fd18261f8f497d32418658fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2421690
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-09-21 12:11:10 +00:00
Paul Lewis 862107080d Revert "Reland "Remove support for remote modules""
This reverts commit b3859e8d65.

Reason for revert: Breaking roll (https://ci.chromium.org/p/chromium/builders/ci/win-archive-rel/17700)

Original change's description:
> Reland "Remove support for remote modules"
> 
> This reverts commit d5044ddf05.
> 
> Reason for revert: Fixed Chromium debug issue.
> 
> Original change's description:
> > Revert "Remove support for remote modules"
> > 
> > This reverts commit 419c91eff6.
> > 
> > Reason for revert: Breaks roll https://chromium-review.googlesource.com/c/chromium/src/+/2416805
> > 
> > Original change's description:
> > > Remove support for remote modules
> > > 
> > > LightHouse is currently broken in Canary, because of problems with
> > > the appspot server. This isn't the first occurrence of this problem
> > > and it becomes increasingly more difficult to figure out why the
> > > server keeps on breaking. This is combined with a large infrastructure
> > > cost of supporting remote modules and a confusing debugging experience
> > > when working with it locally.
> > > 
> > > The reason we had remote modules was the fact that these modules are
> > > too large to be included in the Chromium bundle. In the last months,
> > > we have made numerous remote modules bundled, by applying minifications
> > > and optimizations to each module.
> > > 
> > > The remaining remote module that we are currently shipping is LightHouse.
> > > Since the remote appspot server is broken and unlikely to be fixed
> > > anytime soon, now is the best time to finally resolve the remote
> > > modules question.
> > > 
> > > Therefore, we remove support for remote modules from the `module.json`
> > > files and `Runtime.js`. Additionally, we update the build system
> > > to properly generate the required files and load them via ES modules.
> > > 
> > > We will be able to perform subsequent cleanups in the Runtime to remove
> > > more infrastructure related to scripts/remote modules, but given that
> > > this CL is already quite large we are doing that in a follow-up CL.
> > > 
> > > Follow-up action items for the LightHouse folks are to further decrease
> > > the bundle size for LightHouse. Since we are now loading it via ES
> > > modules, we can now use ES imports in the `devtools-dt-bundle.js` as
> > > well. This allows us to remove the copy of the SDK files, as well as
> > > make use of proper ES exports, rather than the browserified requires.
> > > 
> > > R=​aerotwist@chromium.org,yangguo@chromium.org,paulirish@chromium.org
> > > 
> > > Fixed: 1128890
> > > Change-Id: Ib4271a8064b18d31b75d9e28dbe5e3cb3c77d7ff
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416511
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > 
> > TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
> > 
> > Change-Id: I9d3da08108a35d7dadeefd526ea9dbd562ad3432
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416519
> > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> 
> Change-Id: I26bf0565297c8e167039362b30109d7020bbca56
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2418431
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,alexrudenko@chromium.org

Change-Id: I0ed24d32c9b68bc4cb8026f6fc362540800beeb0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2418408
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-09-18 21:55:03 +00:00
Tim van der Lippe b3859e8d65 Reland "Remove support for remote modules"
This reverts commit d5044ddf05.

Reason for revert: Fixed Chromium debug issue.

Original change's description:
> Revert "Remove support for remote modules"
> 
> This reverts commit 419c91eff6.
> 
> Reason for revert: Breaks roll https://chromium-review.googlesource.com/c/chromium/src/+/2416805
> 
> Original change's description:
> > Remove support for remote modules
> > 
> > LightHouse is currently broken in Canary, because of problems with
> > the appspot server. This isn't the first occurrence of this problem
> > and it becomes increasingly more difficult to figure out why the
> > server keeps on breaking. This is combined with a large infrastructure
> > cost of supporting remote modules and a confusing debugging experience
> > when working with it locally.
> > 
> > The reason we had remote modules was the fact that these modules are
> > too large to be included in the Chromium bundle. In the last months,
> > we have made numerous remote modules bundled, by applying minifications
> > and optimizations to each module.
> > 
> > The remaining remote module that we are currently shipping is LightHouse.
> > Since the remote appspot server is broken and unlikely to be fixed
> > anytime soon, now is the best time to finally resolve the remote
> > modules question.
> > 
> > Therefore, we remove support for remote modules from the `module.json`
> > files and `Runtime.js`. Additionally, we update the build system
> > to properly generate the required files and load them via ES modules.
> > 
> > We will be able to perform subsequent cleanups in the Runtime to remove
> > more infrastructure related to scripts/remote modules, but given that
> > this CL is already quite large we are doing that in a follow-up CL.
> > 
> > Follow-up action items for the LightHouse folks are to further decrease
> > the bundle size for LightHouse. Since we are now loading it via ES
> > modules, we can now use ES imports in the `devtools-dt-bundle.js` as
> > well. This allows us to remove the copy of the SDK files, as well as
> > make use of proper ES exports, rather than the browserified requires.
> > 
> > R=​aerotwist@chromium.org,yangguo@chromium.org,paulirish@chromium.org
> > 
> > Fixed: 1128890
> > Change-Id: Ib4271a8064b18d31b75d9e28dbe5e3cb3c77d7ff
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416511
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> 
> TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: I9d3da08108a35d7dadeefd526ea9dbd562ad3432
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416519
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>

Change-Id: I26bf0565297c8e167039362b30109d7020bbca56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2418431
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-09-18 17:50:39 +00:00
Alex Rudenko d5044ddf05 Revert "Remove support for remote modules"
This reverts commit 419c91eff6.

Reason for revert: Breaks roll https://chromium-review.googlesource.com/c/chromium/src/+/2416805

Original change's description:
> Remove support for remote modules
> 
> LightHouse is currently broken in Canary, because of problems with
> the appspot server. This isn't the first occurrence of this problem
> and it becomes increasingly more difficult to figure out why the
> server keeps on breaking. This is combined with a large infrastructure
> cost of supporting remote modules and a confusing debugging experience
> when working with it locally.
> 
> The reason we had remote modules was the fact that these modules are
> too large to be included in the Chromium bundle. In the last months,
> we have made numerous remote modules bundled, by applying minifications
> and optimizations to each module.
> 
> The remaining remote module that we are currently shipping is LightHouse.
> Since the remote appspot server is broken and unlikely to be fixed
> anytime soon, now is the best time to finally resolve the remote
> modules question.
> 
> Therefore, we remove support for remote modules from the `module.json`
> files and `Runtime.js`. Additionally, we update the build system
> to properly generate the required files and load them via ES modules.
> 
> We will be able to perform subsequent cleanups in the Runtime to remove
> more infrastructure related to scripts/remote modules, but given that
> this CL is already quite large we are doing that in a follow-up CL.
> 
> Follow-up action items for the LightHouse folks are to further decrease
> the bundle size for LightHouse. Since we are now loading it via ES
> modules, we can now use ES imports in the `devtools-dt-bundle.js` as
> well. This allows us to remove the copy of the SDK files, as well as
> make use of proper ES exports, rather than the browserified requires.
> 
> R=​aerotwist@chromium.org,yangguo@chromium.org,paulirish@chromium.org
> 
> Fixed: 1128890
> Change-Id: Ib4271a8064b18d31b75d9e28dbe5e3cb3c77d7ff
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416511
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=yangguo@chromium.org,paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org

Change-Id: I9d3da08108a35d7dadeefd526ea9dbd562ad3432
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416519
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-09-17 16:36:31 +00:00
Tim van der Lippe 419c91eff6 Remove support for remote modules
LightHouse is currently broken in Canary, because of problems with
the appspot server. This isn't the first occurrence of this problem
and it becomes increasingly more difficult to figure out why the
server keeps on breaking. This is combined with a large infrastructure
cost of supporting remote modules and a confusing debugging experience
when working with it locally.

The reason we had remote modules was the fact that these modules are
too large to be included in the Chromium bundle. In the last months,
we have made numerous remote modules bundled, by applying minifications
and optimizations to each module.

The remaining remote module that we are currently shipping is LightHouse.
Since the remote appspot server is broken and unlikely to be fixed
anytime soon, now is the best time to finally resolve the remote
modules question.

Therefore, we remove support for remote modules from the `module.json`
files and `Runtime.js`. Additionally, we update the build system
to properly generate the required files and load them via ES modules.

We will be able to perform subsequent cleanups in the Runtime to remove
more infrastructure related to scripts/remote modules, but given that
this CL is already quite large we are doing that in a follow-up CL.

Follow-up action items for the LightHouse folks are to further decrease
the bundle size for LightHouse. Since we are now loading it via ES
modules, we can now use ES imports in the `devtools-dt-bundle.js` as
well. This allows us to remove the copy of the SDK files, as well as
make use of proper ES exports, rather than the browserified requires.

R=aerotwist@chromium.org,yangguo@chromium.org,paulirish@chromium.org

Fixed: 1128890
Change-Id: Ib4271a8064b18d31b75d9e28dbe5e3cb3c77d7ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2416511
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-17 14:49:58 +00:00
Tim van der Lippe 96e056291f Generate HTML entrypoints dynamically
This removes the duplication of the multiple HTML entrypoint files
that were defined. It makes sure that all entrypoints honor the
dark mode styling, as well as the proper no-referrer (there were
some files that had these fixes missing).

R=aerotwist@chromium.org

Change-Id: If5022e46c69050d8a7fd3ea695a644d42f4d822c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410227
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-09-15 11:23:52 +00:00
Alex Rudenko eb8edea670 Extract CSS in the overlay's paused tool
Extracts CSS into a separate file (for now for a single tool to keep
the CL small). I have tried using the prefix to indicate imports
invoking the rollup plugin but it does not work well with eslint
rules requiring imports to start with ../ or ./.

Bug: 1100925
Change-Id: I651b66a2e8ddbc977c87800b5d951b3ef8a81186
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2404648
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-09-11 13:31:04 +00:00
Tim van der Lippe 5df64b2cd4 [globals] self.Runtime.cachedResources
This refactors away the cachedResources from an object map
to a normal Map as defined in `Runtime.js`. The Map is used during
boot time by setting the relevant stylesheet contents, which is
included by `build_release_applications`. Moreover, it moves the
`*_module.js` files into the `modules` array rather than scripts.
This ensures that `*_module.js` files can use ES imports.

In a follow-up CL, we can do additional cleanup in the Runtime
to stop retrieving `resources` in `_loadResources`, as that should
no longer be possible. (In both debug and non-debug we build the
appropriate `_module.js` files)

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

Bug: 1058320

Change-Id: I89602b332360338f5914038f6cd505f75b531f8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2398829
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-11 13:05:54 +00:00
Tim van der Lippe 2b117e76f5 Implement GRD file check for devtools_pre_built
While we implemented this check for `devtools_module` and
`devtools_entrypoint`, we did not do so for `devtools_pre_built`.
This caused build failures yesterday when we forgot to add the
live directive of lit-html in the GRD files.

Therefore, implement the same check for `devtools_pre_built`. This
not only catches the live directive file missing, but also found out
that the imports for Acorn were using the wrong version. We use the
`.mjs` bundles from Acorn, not the `.js` versions.

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

Bug: 1126630
Change-Id: I54004efda6fb0ac50f894262f09fe2104d1b2f86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2403322
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-10 14:10:43 +00:00
Tim van der Lippe cac65d4fa0 Remove skip_rollup
This was a temporary flag as part of the devtools_entrypoint migration.
Since that migration has concluded, we can now remove all references
to it and clean up `build_release_applications.py`.

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

Bug: 1101738
Change-Id: I3ef9ec1a99bc9fc1758532124db22b3b4b1a5e2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391140
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-08 15:44:09 +00:00
Tim van der Lippe 1164044d4c Migrate test_runner to devtools_entrypoint
This is the very last folder that needed to migrate. As such,
we can now remove all references to `all_devtools_module_sources`
and its corresponding `copy_devtools_modules` infrastructure.

A follow-up change will remove all Rollup logic from
`build_release_applications` as well.

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

Bug: 1101738
Change-Id: Ib706b58d56a76ee367378059aa49b6931b6f6727
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2390630
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-03 09:59:01 +00:00
Tim van der Lippe 19a45dfd55 Remove is_legacy_javascript_entrypoint
This removes the now-obsolete is_legacy_javascript_entrypoint build flag,
which was used as part of the devtools_entrypoint migration.

This uncovered that accessibility was still using devtools_pre_built
and a file was missing from the GRD variable.

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

Fixed: 1101738
Change-Id: Ie1556ccc1d1563c855417de18e896308de0cfe19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2356305
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-08-28 12:32:29 +00:00
Tim van der Lippe 662c01bba2 Remove ProtocolProxyApiWorkaround
The upstream issue has been fixed in TypeScript 4 and therefore this workaround
is no longer necessary.

R=sigurds@chromium.org

Change-Id: I4a831566f3a7f7756f8938668c38e5fabe2ca14c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2367947
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-08-21 14:10:19 +00:00
Jack Franklin a6a4ad6fdf Copy devtools_entrypoint sourcemaps into resources
Fixed: 1115876
Change-Id: I9b797acc355129e2f97a94a06001f3bd82b0299b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354091
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-08-18 10:26:28 +00:00
Ian Clelland 2f5d7054bb Don't abort copying multiple files when one matches
Bug: 1115386
Change-Id: Ib9be093c232066a21843acc078189ce0da3bde53
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2351521
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-08-12 10:26:57 +00:00
Paul Lewis 7e3e7bb351 Early exit from copy-file(s).js
Now that we have copy functions that do not create hardlinks in gen, it
shouldn't be necessary to remove the target file before writing. This CL
removes the unlinking and early exits.

Change-Id: I8e099224479458d446977f930065b4c54a3d0ac6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2334972
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-08-11 11:53:41 +00:00
Paul Lewis 20d9bb09b4 Update copy paths to be absolute
The path wrangling we do for copy-files.js does not work on all builds.
This CL updates the paths to use absolute ones everywhere.

Bug: 1113321
Change-Id: I7d8c3bb500ee4fcff6d4b564c17230bafb6b9b2f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2339528
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-08-06 10:11:57 +00:00
Paul Lewis de0d0a288f [TypeScript] Ensure no hardlinks before tsc runs
When TypeScript writes to pre-existing files, it will overwrite the
contents, but it won't create a new file per se. If files in gen/ were
previously created by devtools_pre_built they will be hardlinked to the
original source file, thus any changes tsc makes to the file in gen will
be reflected back to the source. This causes an issue with ninja, since
it believes on the next run that the source file has changed.

This CL updates the behavior of devtools_pre_built such that it no
longer calls gn's copy, but rather a node utility that ensures that
there is a freshly minted copy of the file rather than a hardlink.

Change-Id: I11a23fce764101eb237e434a64159223ef8d700e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2335277
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-08-04 08:36:03 +00:00