Mathias Bynens
4c6e92b7b8
Avoid collapsing inline tag whitespace
...
This patch ensures we collapse spaces between DOM nodes
into a single space rather than removing the space entirely.
This prevents issues with missing spaces in UI text, and
generally makes the HTML minification step more safe.
Bug: chromium:1264791
Change-Id: Ib8dfaa58e973ee8682a1f43226db9f9483d9606b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3252958
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Mathias Bynens <mathias@chromium.org >
2021-10-29 12:24:12 +00:00
Tim van der Lippe
b1953da009
Do not include generated CSS files in code coverage report
...
These are auto-generated and we don't need to know the code coverage for
these files.
R=jacktfranklin@chromium.org
Bug: none
Change-Id: Ieaaed88a3752a755e4f5e30495e38434330c7263
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3222663
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-10-14 10:46:49 +00:00
Tim van der Lippe
59f68132b1
Make lighthouse_worker a proper entrypoint
...
This entrypoint was still being copied over, due to techdebt we
had before. The techdebt has since been removed, so we can now
properly use `devtools_{module,entrypoint}` to process these files.
R=jacktfranklin@chromium.org
Fixed: 1248392
Change-Id: I8c7394c62c21b9b73e259fd9206510c92203ad0a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3158384
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-10-04 16:25:42 +00:00
Jack Franklin
fc6226b017
Update Rollup and terser
...
This pulls in the bugfix for mangling private class fields
reported in https://github.com/terser/terser/issues/1067
DISABLE_THIRD_PARTY_CHECK=Fix rollup config
R=jacktfranklin@chromium.org
Bug: 1222126
Change-Id: I77a1ddc3697498829e595cead728479e81e7889c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3158385
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
2021-09-21 12:28:03 +00:00
Kriti Sapra
afc5528f54
Added line in css generating script to say the file is auto generated
...
Bug: 1106746
Change-Id: I7452b10640b0f0efaf273f1c950190d6b2a45008
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3164343
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-09-17 07:39:56 +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
Kriti Sapra
2d85f889eb
[CSS]: panels/network
...
Bug: 1106746
Change-Id: Ia9a56e2a4e30308e474c323f473b3f63a68a993f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3097671
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-08-18 10:01:01 +00:00
Tim van der Lippe
438d3834df
Fix filename in generated tsconfig
...
The generated JavaScript file ends with `.js` and therefore we
should list the full name in our tsconfig as well. We ran into
compilation issues on https://crrev.com/c/3073941 and they required
the full extension to be listed. It's not clear to me why we
didn't run into this before, but it doesn't seem to break
any of the existing CSS file inclusions either.
R=jacktfranklin@chromium.org
CC=alexrudenko@chromium.org ,kritisapra@google.com
Bug: 1106746
Change-Id: I45d593f4aee56b783349c82ea91cbde9b2db7d66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075188
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-05 15:59:39 +00:00
Sigurd Schneider
b509ae7393
Avoid generating a double newline in code_generator_frontend.py
...
Bug: chromium:1106746
Change-Id: If9a4074466c1df88c2810ac188dac00390e5fcea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3074605
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
2021-08-05 11:40:19 +00:00
Kriti Sapra
897c8aa904
[CSS] panels/lighthouse and generate_css_js now escapes ` characters
...
Since we put the contents of the CSS file in ``, we need to escape any
characters that may appear in comments in the CSS file before adding
it to the .css.js file.
Bug: 1106746
Change-Id: I5e304fac9c254699f64ebe1a8f99d0b13f7307ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059610
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-07-29 13:00:17 +00:00
Tim van der Lippe
2b21feb560
Use devtools.gni for devtools_location
...
The Chromium build configuration now defines where DevTools lives.
This requires https://crrev.com/c/3043613 to roll into /build first.
R=alexrudenko@chromium.org
Fixed: 1231495
Change-Id: I2b6721a9541d191492429e9a0027523f7c9bd013
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3043614
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-07-22 13:27:33 +00:00
Tim van der Lippe
e4dfc5e76a
Fix devtools_location specification
...
By moving the declaration into default_args, we make sure that we don't
accidentally override any definition in the GN args of an engineers.
This allows us to gradually cleanup devtools_location in Chromium.
R=alexrudenko@chromium.org
Bug: 1231495
Change-Id: I52947737907fa4c536e784eb3e993805623b0489
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3043612
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-21 13:34:32 +00:00
Kriti Sapra
bc43679a32
Added clean-css to minify CSS on release build
...
Bug: 1106746
Change-Id: I4165bb4fa30564dc3b8eff942f6cb341a6e31ffb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3037550
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-07-20 12:22:02 +00:00
Tim van der Lippe
0f7a51b049
Fix duplicate entrypoint naming
...
In preparation of renaming an entrypoint, I discovered there was
a little bit of duplication in `generate_html_entrypoints`. To ease
renaming and maintenance, let's unify the two.
R=jacktfranklin@chromium.org
Bug: 1228264
Change-Id: I1bc98123ecd2f03e23003611bcd1e571f8c75cfb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3021230
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-07-12 16:41:25 +00:00
Sigurd Schneider
297b80bd3c
Distinguish qualified and unqualified names
...
This change distinguishes qualified and unqualified names in
the inspector backend to avoid programming mistakes.
DISABLE_THIRD_PARTY_CHECK=disable
Bug: chromium:1172300
Change-Id: I0e0bdd82e9a4f7ce4feff459159bc18d124a949a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3003258
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-07-05 13:08:18 +00:00
Kriti Sapra
1d765a5fdf
Added new .css.js files to grd_files_debug_sources
...
We got alerted that DevTools was not loading in chrome due to .css.js
files not being listed in the grd_files_debug_sources. This CL has the
fix for that. It adds all the migrated CSS files so far to the
debug grd files.
Bug: 1106746
Change-Id: I9b75581e59ecd3290b4fd4eecf1ddbcd46954e18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2979698
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-23 09:44:29 +00:00
Simon Zünd
918e280504
Revert "Added grd_files_sources to generate_css template"
...
This reverts commit d2b207117a .
Reason for revert: Seems to break debug compilation step:
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Linux%20Compile%20Debug/3919/overview
Also confirmed locally.
Original change's description:
> Added grd_files_sources to generate_css template
>
> Bug: 1106746
> Change-Id: I4bbfc0b577248e810521460c9fb35f9dcb320f9b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978357
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> Commit-Queue: Kriti Sapra <kritisapra@google.com >
Bug: 1106746
Change-Id: Iddd80ce81fb74092d7852b3e4f93bafa5bf7b0bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2979696
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org >
Auto-Submit: Simon Zünd <szuend@chromium.org >
2021-06-23 06:28:50 +00:00
Kriti Sapra
d2b207117a
Added grd_files_sources to generate_css template
...
Bug: 1106746
Change-Id: I4bbfc0b577248e810521460c9fb35f9dcb320f9b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978357
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-06-22 16:28:21 +00:00
Tim van der Lippe
4b99b80a80
Update Terser to mangle private class fields
...
Using a regex to denote all properties that can be mangled, we
can mangle all private class fields. Since we know that private
class fields are only accessed in a class, we know that terser
can safely mangle the properties in a single rolled up bundle.
Mangling of private class fields on `core/sdk/` has shown an
expected 8.6% bundle size improvement.
R=aerotwist@chromium.org
Doc: https://docs.google.com/document/d/13yeJuvIq8JYFXSOsjRgcXzQVrIviJmukvxj27rn1Ab8/preview
Bug: 1222126
Change-Id: Id3bb3f4ff4af295eddaa4bce3bff4fabe4d87794
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975285
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 >
2021-06-22 13:39:19 +00:00
Kriti Sapra
15269c4cf5
Created script to create .css.js files for CSS files
...
Bug: 1106746
Change-Id: I7612419d19815ce5ad67c842215f65f93ca90769
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2960177
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-18 11:18:54 +00:00
Tim van der Lippe
0005b80576
Minify html template literals in release mode
...
Because of https://github.com/asyncLiz/minify-html-literals/issues/37
we are unable to minify CSS in template literals. However,
since we are moving CSS over into separate files, we can minify
these CSS files separately.
This also caught two issues with our templates, one of which was missing
the closing tag name whereas the other was missing the closing angle
bracket. As such, in release mode, we are now fully validating our
HTML structure.
R=jacktfranklin@chromium.org
Fixed: 1213034
Change-Id: Ieb4708334e627d368cb94db541b545b9dea5e895
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2922503
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-06-03 11:23:07 +00:00
Tim van der Lippe
8b929548c0
Also add license headers for .gni files
...
R=jacktfranklin@chromium.org
Bug: 1213449
Change-Id: I3228629bbaa1c3824a721a93782356ec71855513
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919951
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-05-26 16:19:23 +00:00
Alex Rudenko
7c94b5f29e
Compress md files
...
This CL adds compression for md files resulting in ~16KB reduction
in binary size of chromium resources.
Bug: chromium:1211337
Change-Id: I5f5482ae0bc297adea4c4bea0c911b4303877484
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2916384
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2021-05-25 13:37:47 +00:00
Alex Rudenko
8505e32b7b
Implement caching for file compression during builds
...
This CL adds a new script to compress files using brotli. The new script
maintains a cache of compressed files so if the file was previously
compressed and has not been changed, it is not compressed again.
The compression happens only in release builds. Also, this CL
includes JSON into the compression list saving ~0.7MB in binary size.
Bug: chromium:1211337
Change-Id: I8ed8189d762f5532a261d748cbc2eb8a4be9a25e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2905507
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-25 06:45:43 +00:00
Tim van der Lippe
4fb02b1c0b
Add support for depending on non-TS targets
...
Currently, we have the dependencies on the generated locales
scattered into `front_end/` and the `test/unittests/`. However,
i18n should typically be the only folder that should know about
the locales. The reason we split these off, is that we don't want
to rebuild all of DevTools whenever somebody changes a localization
string.
That said, with the recent updates to the build system, it is
now possible to add them to `public_deps`, to ensure we don't
need to rebuild all of DevTools.
R=szuend@chromium.org
Bug: none
Change-Id: I9892362032c80862cc224682fe5dc73fde91af21
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912720
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-25 04:43:53 +00:00
Tim van der Lippe
e902a9ea64
Type check Rollup configuration with TypeScript
...
By moving the configuration file to `scripts/build`, we are correctly
using the `moduleResolution = 'node'`. Then, we enable TypeScript with
`// @ts-check`, we get warnings in VS Code. There were some small fixes.
Mostly that it removed an unnnecessary closure and `buildStart` hook,
which we no longer require. Additionally, the `output` format now
conforms to what Rollup expects.
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I55daf8e6f3e32f81afd9e0b13ffc7b49bddfedfc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910110
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-24 11:57:57 +00:00
Takuto Ikuta
0e87680f36
Reland "Reland "use python3 in devtools-frontend by default""
...
This reverts commit 7c57958680 .
Reason for revert:
This uses dict instead of set in modular_build.py for deterministic
output.
ref: https://softwaremaniacs.org/blog/2020/02/05/dicts-ordered/en/
I confirmed that devtools_app.js is the same in repeated builds.
Original change's description:
> Revert "Reland "use python3 in devtools-frontend by default""
>
> This reverts commit 0d4947c37e .
>
> Reason for revert: https://crbug.com/1211770
>
> Original change's description:
> > Reland "use python3 in devtools-frontend by default"
> >
> > This reverts commit a8336c1e58 .
> >
> > Reason for revert:
> > use universal_newlines instead of text for
> > https://docs.python.org/3/library/subprocess.html#subprocess.Popen
> >
> > I tried to divide this CL in to make py2/3 compatible and switch in
> > another CL. But that hit another issue due to the difference of string
> > type around io.StringIO and cStringIO.StringIO like
> > https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8846743161604002304/+/u/compile/raw_io.output_failure_summary_
> >
> > So decided to re-land the switch with fix for known issue.
> >
> > I confirmed this works for python3.6 too.
> >
> > Original change's description:
> > > Revert "use python3 in devtools-frontend by default"
> > >
> > > This reverts commit 37c0bf698d .
> > >
> > > Reason for revert:
> > > Compatibility issues with python 3.6.
> > >
> > > Original change's description:
> > > > use python3 in devtools-frontend by default
> > > >
> > > > Fixed: 1205624, 1205625
> > > > Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> > > > Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> > > > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> > > > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> > >
> > > Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> > > Commit-Queue: Michael Achenbach <machenbach@chromium.org >
> >
> > Bug: 1210939, 1205624, 1205625
> > Change-Id: Ia7ddf5ab37c8df3e2f682bf89cb55ef30e663341
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909053
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
>
> Bug: 1210939
> Bug: 1205624
> Bug: 1205625
> Bug: 1211770
> No-Tree-Checks: true
> No-Presubmit: true
> Change-Id: Ic3a6add15b4126dfe818b445a5227253d296ee96
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910016
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> Reviewed-by: Michael Achenbach <machenbach@chromium.org >
Bug: 1210939
Bug: 1205624
Bug: 1205625
Bug: 1211770
Change-Id: I2acb2968e68f55a663cd5221c1c92b16301392cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910020
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2021-05-24 09:58:37 +00:00
Takuto Ikuta
7c57958680
Revert "Reland "use python3 in devtools-frontend by default""
...
This reverts commit 0d4947c37e .
Reason for revert: https://crbug.com/1211770
Original change's description:
> Reland "use python3 in devtools-frontend by default"
>
> This reverts commit a8336c1e58 .
>
> Reason for revert:
> use universal_newlines instead of text for
> https://docs.python.org/3/library/subprocess.html#subprocess.Popen
>
> I tried to divide this CL in to make py2/3 compatible and switch in
> another CL. But that hit another issue due to the difference of string
> type around io.StringIO and cStringIO.StringIO like
> https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8846743161604002304/+/u/compile/raw_io.output_failure_summary_
>
> So decided to re-land the switch with fix for known issue.
>
> I confirmed this works for python3.6 too.
>
> Original change's description:
> > Revert "use python3 in devtools-frontend by default"
> >
> > This reverts commit 37c0bf698d .
> >
> > Reason for revert:
> > Compatibility issues with python 3.6.
> >
> > Original change's description:
> > > use python3 in devtools-frontend by default
> > >
> > > Fixed: 1205624, 1205625
> > > Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> > > Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> > > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> > > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> >
> > Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org >
>
> Bug: 1210939, 1205624, 1205625
> Change-Id: Ia7ddf5ab37c8df3e2f682bf89cb55ef30e663341
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909053
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> Reviewed-by: Michael Achenbach <machenbach@chromium.org >
Bug: 1210939
Bug: 1205624
Bug: 1205625
Bug: 1211770
No-Tree-Checks: true
No-Presubmit: true
Change-Id: Ic3a6add15b4126dfe818b445a5227253d296ee96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910016
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Michael Achenbach <machenbach@chromium.org >
2021-05-21 13:19:43 +00:00
Takuto Ikuta
0d4947c37e
Reland "use python3 in devtools-frontend by default"
...
This reverts commit a8336c1e58 .
Reason for revert:
use universal_newlines instead of text for
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
I tried to divide this CL in to make py2/3 compatible and switch in
another CL. But that hit another issue due to the difference of string
type around io.StringIO and cStringIO.StringIO like
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8846743161604002304/+/u/compile/raw_io.output_failure_summary_
So decided to re-land the switch with fix for known issue.
I confirmed this works for python3.6 too.
Original change's description:
> Revert "use python3 in devtools-frontend by default"
>
> This reverts commit 37c0bf698d .
>
> Reason for revert:
> Compatibility issues with python 3.6.
>
> Original change's description:
> > use python3 in devtools-frontend by default
> >
> > Fixed: 1205624, 1205625
> > Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> > Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
>
> Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> Commit-Queue: Michael Achenbach <machenbach@chromium.org >
Bug: 1210939, 1205624, 1205625
Change-Id: Ia7ddf5ab37c8df3e2f682bf89cb55ef30e663341
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909053
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Michael Achenbach <machenbach@chromium.org >
2021-05-20 07:49:35 +00:00
Michael Achenbach
a8336c1e58
Revert "use python3 in devtools-frontend by default"
...
This reverts commit 37c0bf698d .
Reason for revert:
Compatibility issues with python 3.6.
Original change's description:
> use python3 in devtools-frontend by default
>
> Fixed: 1205624, 1205625
> Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Commit-Queue: Michael Achenbach <machenbach@chromium.org >
2021-05-19 17:13:34 +00:00
Takuto Ikuta
37c0bf698d
use python3 in devtools-frontend by default
...
Fixed: 1205624, 1205625
Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Michael Achenbach <machenbach@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-18 14:41:02 +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
27ff2f24ca
Add DCHECK function to Platform
...
In the Chromium backend engineers can use `DCHECK()` to ensure
certain invariants are held, but only execute these assertions
in a debug build. [1] Release builds do not ship with DCHECKS enabled.
In a similar fashion, introduce a build-time generated function
`DHCECK` that is only generated when `devtools_dcheck_always_on`
is set as GN arg. By default, `is_debug` builds enable
`devtools_dcheck_always_on`. However, in a release build, you can
explicitly set `devtools_dcheck_always_on` to `true` to achieve
the same effect.
When the GN arg is set, the build generates the `dcheck.js` file
with an implementation that checks the condition and fails if
it is not met. When the arg is not set, the function implementation
remains empty and becomes a noop.
To make sure that these functions calls are removed in a release
build (rather than being a noop), the terser configuration is
updated to treat these functions as pure. As such, terser will
remove any calls if the function implementation is empty. In a
release build that explicitly turns out the dchecks, terser
will not remove the function calls.
Lastly, to make sure that all code related to the dcheck is removed,
the condition needs to be a lambda. If we were to make it a raw
boolean, then `terser` would not be able to determine whether it
can remove the condition itself and would leave that behind. In other
words, the `DCHECK` call would still leave some artifacts behind,
namely the condition computation itself. By making it a lambda,
terser can deduce that the lambda creation has no side-effect and
remove the lambda if the `DHCECK` call is removed.
R=aerotwist@chromium.org
[1]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#check_dcheck_and-notreached
Bug: none
Change-Id: Ic396f102141d9eb67c8690bd2a601b56061b9d8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2894390
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2021-05-14 13:47:30 +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
2acbbd12f3
Add default visibility to devtools_entrypoint
...
Any devtools_entrypoint now has a default visibility of solely the
targets that are specified in the same folder. If you want to allow
other folders to import your code, you can do so by adding an
explicit visibility to your target.
R=jacktfranklin@chromium.org
Fixed: 1202788
Change-Id: I35e4f0f8d94e909f98016246ad975bd5b898af5c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2856777
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-04-29 14:43:24 +00:00
Tim van der Lippe
0fa20648c8
Use relative file input for GRD script
...
We can use the _expected_grd_files list as input, since this is
already relative to the root directory. Therefore, we no longer
need to keep track of these relative directories.
R=alexrudenko@chromium.org
Bug: 1174013
Change-Id: I18bf22cf4cc5b99786c813aed8967ff40ecde01c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2848230
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-04-28 10:12:24 +00:00
Tim van der Lippe
19dba6b42b
Restrict ui/legacy:bundle visibility
...
This locks down the visibility of ui/legacy:bundle to the various
folders that already depend on it. For now, the visibility is
quite broad, as there is still plenty of code depending on the
legacy UI implementation.
Consequently, downstream projects (such as the Edge DevTools fork)
will break if they depend on this bundle. Therefore, add a GN arg
that allows the visibility to be extended. To use this GN arg,
downstream projects can change their `default_args` in the root
`.gn` file:
default_args = {
devtools_ui_legacy_visibility = [
"//front_end/forked/folder/*",
]
}
This means that they can broaden the visibility of UI. It is still
recommended to remove as many of the dependencies on UI as feasible,
but that will likely not finish any time soon.
R=jacktfranklin@chromium.org ,aerotwist@chromium.org
Bug: 1202788
Change-Id: I868e88ee3b1c66dd7c79d30d07648a7d2828e8f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2853551
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-04-27 13:14:05 +00:00
Tim van der Lippe
ada1b595b7
Remove old DevTools GRD
...
This removes the GRD that was previously put in gen/devtools and
removes copying all files into gen/devtools as well.
This requires https://crrev.com/c/2844838 to land first in Chromium
and rolled into DevTools itself.
R=alexrudenko@chromium.org
Fixed: 1174013
Change-Id: I8fa4272caa371d126a46ef61da0071ba9d3a85ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2848229
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-04-27 09:33:41 +00:00
Tim van der Lippe
b4ab8dae8a
Generate GRD file in target_gen_dir
...
This generates the GRD file in out/Default/gen/front_end with the Chromium file
in out/Default/gen/third_party/devtools-frontend/src/front_end. After
https://crrev.com/c/2844838 is submitted, we can remove the old
outfile and remove the copying into out/Default/gen/devtools.
R=alexrudenko@chromium.org ,aerotwist@chromium.org
Bug: 1174013
Change-Id: Idd7d992c443fcd84d3df83e461d9b5379f9e2b1b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2846331
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-04-23 10:08:47 +00:00
Tim van der Lippe
3edd9d7219
Remove intermediate lists that were used in GRD generation
...
Since we now use the GN metadata to specify all relevant files,
we no longer require these lists. That allows us to clean up the
various actions to no longer having to check the contents of the
lists.
R=aerotwist@chromium.org
Bug: 1174013
Change-Id: Ia361aec69fe9af702a7667e33f7fc389f8a5a24f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2844169
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-22 12:19:57 +00:00
Tim van der Lippe
0d8ffe34d5
Use GN metadata to compute GRD files
...
GN metadata allows to specify and later query metadata from any
action in our build graph. Using GN metadata, we can specify
GRD files on an action and collect these files on the top level.
Then, we can compare the list of collected files to the expected
GRD files in `devtools_grd_files.gni` to ensure they match.
As a follow-up change, we can remove the intermediate lists we have
been specifying in `all_devtools_modules.gni` and
`devtools_module_entrypoints.gni`, which now become obsolete. That's
because both `devtools_module` and `devtools_entrypoint` now specify
the files in their respective metadata and essentially perform the
check that all relevant files are collected.
R=aerotwist@chromium.org
Also-By: alexrudenko@chromium.org
Bug: 1174013
Change-Id: I9dd2e6f7e010b5c25f83556511af12d5d1c2ec7c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2843322
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-22 11:50:37 +00:00
Tim van der Lippe
ed0c9a1332
Cleanup forwarding variables in node_action
...
Now all variables are properly forwarded, which means we no
longer have to list individual GN properties to be fowarded
that are used in the numerous `node_action` definitions.
Since `args` and `scripts` are specifically used in `node_action`,
these must not be forwarded.
R=alexrudenko@chromium.org
Bug: 1174013
Change-Id: I1edcaadc3cb49dd0546c244115328fc8aca51ba0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2843317
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-04-21 14:55:16 +00:00
Tim van der Lippe
8499fe2ad0
Move data_grid to ui/legacy/components/data_grid
...
It also updates the ES Modules ESLint rule to allow for the import
from DataGrid to the legacy UI folder, as they are now nested.
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: I8a6a577b10464216efafed10e62f24ca0c06e194
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2821870
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-12 17:21:23 +00:00
Tim van der Lippe
7b347ca16f
Move entrypoints to sub-folder
...
All JavaScript files for each entrypoint are put in their respective
sub-folder of front-end. The HTML files load from the new location and
build_release_applications has been updated to load from the correct
location.
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: I4b93f3a2127ef2d3ce7dccefe03f70e79dac1c19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2818379
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-12 12:04:18 +00:00
Tim van der Lippe
124fb1d9e6
Replace rjsmin with terser in inspector_overlay
...
We can use the terser plugin for Rollup (which the frontend also
uses) to minify our source code, rather than the Python-based
minifier.
When using terser, we can reduce the maximum file size from 110000
to 65000 bytes (~40% reduction).
R=alexrudenko@chromium.org
Bug: none
Change-Id: Ib2d7fd296ab20150dab44224f5ced03c725f798b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2815120
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2021-04-12 11:37:33 +00:00
Tim van der Lippe
732be58da1
Move *.gni files from root to config/gni
...
This allows us to clean up the OWNERS as well and add a single
OWNERS file in /config/gni to allow all COMMON_OWNERS to make
changes to these files.
DISABLE_THIRD_PARTY_CHECK=File move
R=yangguo@chromium.org
Bug: 1187573
Change-Id: I989caf2762e75725d22fa80f573c72bcf6570dd8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2817617
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-04-12 11:06:13 +00:00
Tim van der Lippe
d7e3db8cc5
Remove special_case_namespaces
...
These were remnants of the Closure Compiler and module.json era,
but we are no longer using these to populate the global scope.
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I61287c81e45207ad7ff0e7fb292d267b41d28f09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2815121
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-04-09 08:50:02 +00:00
Tim van der Lippe
d8caac43df
Move root to core/root
...
R=aerotwist@chromium.org
No-Presubmit: true
Bug: 1187573
Change-Id: I243b006f0b96bec4ff251394cb301e01226893ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2797216
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-03-31 16:21:32 +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
586c802693
Move console to panels/console
...
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: I2b14b96b7478c3a140970bff60d5130f28a3d951
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2767268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-03-18 15:48:57 +00:00