Liviu Rau
3da5d4a22e
Run build scripts with vpython3
...
Bug: 1292013
Change-Id: Idf2e5de0b6ca3a296e5efd7952911783d6005e30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484196
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Liviu Rau <liviurau@chromium.org >
2022-02-25 10:12:14 +00:00
Alex Rudenko
4c118bf7b6
Fix typo in scripts/build/assert_third_party_readmes.py
...
Bug: none
Change-Id: Ife8f1a210db1c501f7c1bb3674aee3f1a558a055
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3480035
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-22 13:58:47 +00:00
Tim van der Lippe
7961ea6fa9
Update build system guidance
...
Remove references to the legacy closure compiler files and add
more guidance with respect to output locations and timestamps in
GN templates.
R=yangguo@chromium.org
Bug: none
Change-Id: I672d196c7f2ceebf6e057c60c4b1630ae2887d90
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3477111
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Yang Guo <yangguo@chromium.org >
2022-02-21 16:22:08 +00:00
Takuto Ikuta
d0e51ea796
add test for esbuild plugin
...
Fixed: 1293772
Change-Id: I0c12c27c66fcab491fac6869f282b3059e16ee9b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439239
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-08 13:52:42 +00:00
Tim van der Lippe
800d875627
Add build script tests
...
You can run these tests with `npm run build-test`, while we also run
them as part of our PRESUBMIT if we make any changes to the build
folder.
R=yangguo@chromium.org
CC=tikuta@chromium.org
Bug: 1293772
Change-Id: Id3b02c83398d2346a4ec5a06f3b938d33070d4f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439987
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-04 13:25:10 +00:00
Takuto Ikuta
4d1f2028c3
esbuild: do not relativize node's built-in modules
...
This is followup of https://crrev.com/c/3430082 .
This fixes error like
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8823327185154097217/+/u/compile__with_patch_/raw_io.output_text_failure_summary_
Bug: 1278663
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_linux_blink_light_rel_fastbuild,devtools_frontend_linux_dbg_fastbuild
Change-Id: Ibdb456f32a3ffa1a24998e2ee58190cb396945cc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3435628
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2022-02-03 10:57:51 +00:00
Takuto Ikuta
6621f46716
devtools_plugin: mark non-relative import as external
...
This is to prevent error like
https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel_fastbuild/95/overview
Bug: 1278663
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_linux_blink_light_rel_fastbuild,devtools_frontend_linux_dbg_fastbuild
Change-Id: I51ee2b52b88b9b52edf47edfd94c4a771540fd89
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3430082
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-02 13:21:01 +00:00
Simon Zünd
957496f839
Minify locale JSON files at build time
...
This CL adds a new build rule "minify_json" that takes a list of JSON
files, minifies them, and puts the result into then "gen/" directory.
The i18n module uses the new rule to minify the locale JSON, reducing
the raw size per locale file 10-15%.
R=tvanderlippe@chromium.org
Fixed: 1293324
Change-Id: I0aabc5cdea7957334dfe21304e117dc23a563606
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3431345
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
2022-02-02 13:19:01 +00:00
Takuto Ikuta
7f5fd554eb
fix build errors
...
This fixes build error when we disable typescript and when we build
puppeteer.
Bug: 1293019
Change-Id: Ia927344166f543846e6fc3351f1621cd03593a49
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3430599
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-02-02 10:45:11 +00:00
Takuto Ikuta
4aef68ea32
enable fast bundle when skip typecheck
...
Use fast bundler if typecheck is skipped, assuming builders/developers
want to get result faster in such build config.
This will also remove the necessity of having devtools_fast_bundle
config from chromium CQ/CI's build.
This is step 6 of http://go/devtools-fast-bundle
Bug: 1278663
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_linux_blink_light_rel_fastbuild,devtools_frontend_linux_dbg_fastbuild
Change-Id: I516b0af30c8c76c9382dfa09763d4efb8d1bdae7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3429380
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
2022-02-01 13:03:00 +00:00
Takuto Ikuta
2548a6cd6c
introduce devtools_fast_bundle build config
...
Proposal: http://go/devtools-fast-bundle
This CL introduces build flag switching bundler from rollup.js to
esbuild by
* adding esbuild to npm without downloading binary packages
* making devtools_plugin for rollup.js re-usable to esbuild
On 24C/48T Z840 Linux machine, this shows following performance
difference by using
```
devtools_skip_typecheck = true
is_debug = false
```
as base build config.
esbuild (devtools_fast_bundle = true)
$ time ninja -C out/Default/
...
real 0m21.174s
user 2m47.513s
sys 0m38.549s
rollup.js (devtools_fast_bundle = false)
$ time ninja -C out/Default/
...
real 1m28.286s
user 30m19.220s
sys 5m36.392s
So esbuild is 3.2x faster and use only 9.6% of machine resouce
(user + sys) compared to rollup.js.
refs:
* https://esbuild.github.io/plugins/#on-resolve
* https://rollupjs.org/guide/en/#resolveid
Bug: 1278663
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_linux_blink_light_rel_fastbuild,devtools_frontend_linux_dbg_fastbuild
Change-Id: If6b2e774f48091b0fe9c959e7ed1ed9bc2b0847c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3401984
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2022-02-01 12:49:12 +00:00
Takuto Ikuta
cfcea4217a
rename rollup to bundle
...
rollup target will support esbuild, so I rename that to bundle.
Bug: 1278663
DISABLE_THIRD_PARTY_CHECK=parent CL has change for npm
Change-Id: I823f425e9ac5d599a3ddc3fd1fcd7e47cd18e3bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3419385
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2022-01-27 10:46:25 +00:00
Takuto Ikuta
9b3b13af90
extract devtools_plugin from rollup.config.js
...
This is extracted from https://crrev.com/c/3401984/30
I'll use this from esbuild too.
Bug: 1278663
DISABLE_THIRD_PARTY_CHECK=parent CL has change for npm
Change-Id: Ia5f3410a2cb59e349e7a76250fbe35b354462a4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3419384
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2022-01-27 10:44:05 +00:00
Takuto Ikuta
95a359d10c
typescript: introduce devtools_skip_typecheck build flag
...
This is experimental flag introducing esbuild for typescript transpiler.
I needed to modify some test code to pass tests with esbuild.
Bug: chromium:1278663
DISABLE_THIRD_PARTY_CHECK=need to add esbuild DEPS too
Change-Id: I661951fc4fd8f5e6a2a599e531638ab294f887f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3330076
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2022-01-24 02:19:51 +00:00
Tim van der Lippe
f2adc90457
Add Puppeteer to chrome://credits
...
R=alexrudenko@chromium.org
Bug: 1282407
Change-Id: I489c47413bc22b4b44cf88a8225c9d908bf7e563
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3404101
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2022-01-20 14:16:01 +00:00
Tim van der Lippe
dcc95c9681
Fix licenses for about:credits
...
This adds an additional_readme_paths.json file that specifies all
directories of third_party packages that we include in the DevTools
bundle. The file is used as part of Chromiums about:credits machinery to
list all licenses of all third_party software (accessible via
chrome://credits).
It also updates the names of the packages to use the full name, which is
used as header of the license.
To ensure that this file remains up-to-date, we also include a GN action
that verifies all third_party directories listed in our GRD are included
in the .json file.
Lastly, add the missing license for Puppeteer.
R=yangguo@chromium.org
Bug: 1282407
Change-Id: Ia3142ab5bbc79804c56bc754934b9aaf1d186d7f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3386943
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
2022-01-17 12:49:00 +00:00
Tim van der Lippe
28af9fbe78
Reland "Do not overwrite generated files when contents remains the same"
...
This reverts commit aaae6b021a .
Reason for revert: always check if tsconfig.json needs to be updated
Original change's description:
> Revert "Do not overwrite generated files when contents remains the same"
>
> This reverts commit c1e414725a .
>
> Reason for revert: Seems to be the cause for CQ compilation errors:
> https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel/19852/overview
>
> Original change's description:
> > Do not overwrite generated files when contents remains the same
> >
> > To ensure that build timestamps don't unnecessarily cause full rebuilds,
> > make sure that we only write the generated contents to a file (if it
> > exists already) if it would be the same. This ensures that the file
> > timestamps remain the same, which will lead GN to conclude that the
> > build action is a noop (which it is).
> >
> > On a new year, the file contents would actually be different, so it
> > would cause a proper rebuild. However, in all months between when the
> > timestamp changes, it won't cause is unnecessarily to rebuild all these
> > files, even though the year hasn't changed (but the timestamp it was
> > based on did).
> >
> > R=jacktfranklin@chromium.org
> >
> > Bug: 1283883
> > Change-Id: I2bdc3a79de710236c1501b21fa505692336cfa82
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377942
> > 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 >
>
> Bug: 1283883
> Change-Id: I938cfe20a7ecf6df6c7becc9fa73a3dcfebe457c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3380583
> Auto-Submit: Simon Zünd <szuend@chromium.org >
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Bug: 1283883
Change-Id: Iae23d721bdeb4c8af227903a38255ee9fc1bc49d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3386675
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2022-01-13 15:20:09 +00:00
Simon Zünd
aaae6b021a
Revert "Do not overwrite generated files when contents remains the same"
...
This reverts commit c1e414725a .
Reason for revert: Seems to be the cause for CQ compilation errors:
https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel/19852/overview
Original change's description:
> Do not overwrite generated files when contents remains the same
>
> To ensure that build timestamps don't unnecessarily cause full rebuilds,
> make sure that we only write the generated contents to a file (if it
> exists already) if it would be the same. This ensures that the file
> timestamps remain the same, which will lead GN to conclude that the
> build action is a noop (which it is).
>
> On a new year, the file contents would actually be different, so it
> would cause a proper rebuild. However, in all months between when the
> timestamp changes, it won't cause is unnecessarily to rebuild all these
> files, even though the year hasn't changed (but the timestamp it was
> based on did).
>
> R=jacktfranklin@chromium.org
>
> Bug: 1283883
> Change-Id: I2bdc3a79de710236c1501b21fa505692336cfa82
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377942
> 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 >
Bug: 1283883
Change-Id: I938cfe20a7ecf6df6c7becc9fa73a3dcfebe457c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3380583
Auto-Submit: Simon Zünd <szuend@chromium.org >
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
2022-01-11 09:29:14 +00:00
Tim van der Lippe
c1e414725a
Do not overwrite generated files when contents remains the same
...
To ensure that build timestamps don't unnecessarily cause full rebuilds,
make sure that we only write the generated contents to a file (if it
exists already) if it would be the same. This ensures that the file
timestamps remain the same, which will lead GN to conclude that the
build action is a noop (which it is).
On a new year, the file contents would actually be different, so it
would cause a proper rebuild. However, in all months between when the
timestamp changes, it won't cause is unnecessarily to rebuild all these
files, even though the year hasn't changed (but the timestamp it was
based on did).
R=jacktfranklin@chromium.org
Bug: 1283883
Change-Id: I2bdc3a79de710236c1501b21fa505692336cfa82
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377942
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 >
2022-01-10 15:54:45 +00:00
Tim van der Lippe
08285ab74f
Use GN build timestamps for copyright year
...
To avoid non-determinism on January 1st of a new year, we have
to use the build timestamp from GN to compute the current year.
The build timestamp will be the same for all bots, which ensures
that all files are built with the same year in the copyright header.
R=jacktfranklin@chromium.org
Fixed: 1283883
Change-Id: Ifbe581ddb65095ca6ef555625be11a370cb8f238
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3372924
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2022-01-07 12:09:00 +00:00
Tim van der Lippe
74e7b89b20
Remove unused scripts
...
None of these are used anymore or are obsolete (for example, because
we removed the module.json files).
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I5f538d38ed6e1156e9ef6cf023daebe90999fb4f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3344910
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2021-12-16 12:13:20 +00:00
Nico Weber
5027efee97
Make devtools-frontend gn files not write absoute paths to generated ninja files
...
Reduces `diff out/gn{1,2}/toolchain.ninja | wc -l` from 464 to 8
on my linux box.
No intended behavior change.
Bug: chromium:1278777
Change-Id: Ib9e711f67646e848fdfb95393ad75519f789ccf1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3330417
Commit-Queue: Nico Weber <thakis@chromium.org >
Auto-Submit: Nico Weber <thakis@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Yang Guo <yangguo@chromium.org >
2021-12-10 15:32:59 +00:00
Tim van der Lippe
4775ec11d6
Remove rjsmin again
...
Chrome OS now uses the appropriate third_party version:
https://crrev.com/c/3311066
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I43470c3d1b761e9ef17aadd90491ddeffdc119aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3318036
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-12-07 10:57:32 +00:00
Tim van der Lippe
d36fbdeda7
Temporarily add back rjsmin.py for Chrome OS
...
Chrome OS is accidentally relying on DevTools build scripts:
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/chromeos/accessibility/common/run_jsbundler.gni;l=16;drc=e86ab6e79b3cef0b3a37f691d8ec38d25fa0ca9e
We should clean that up, but for now let's add back the rjsmin.py script
back to unblock the DevTools autoroller.
R=kprokopenko@chromium.org
Bug: none
Change-Id: Icf51ffb5b468809bd623b3252d2f5c994409ff2f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3313066
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org >
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org >
2021-12-02 15:08:18 +00:00
Tim van der Lippe
2ec9790ec5
Remove build_release_applications and friends
...
This script is now unused and fully replaced by GN. As such, this
concludes the full `module.json` migration and related scripts, which
means we can consider crbug.com/1127902 fixed.
R=jacktfranklin@chromium.org
Fixed: 1127902
Change-Id: I0fde9c4fede0cdc8649e5e455e025a70ed4d2a09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310869
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-12-02 12:08:02 +00:00
Tim van der Lippe
1b5567f78a
Remove resources from perf_ui
...
To remove the module.json file in perf_ui, we need to migrate the
resources to the new `generate_css` template. However, perf_ui is a bit
special, in that it doesn't properly use the widget structure. As such,
it sometimes injects CSS in places where there is no clear shadowRoot
available. Therefore, it is not possible to migrate to CSSStyleSheet in
combination with adoptedStylesheets.
As a workaround (to unblock the module.json removal), we augment
`generate_css` to add legacy file generation. All remaining resources in
DevTools will migrate to these `.css.legacy.js` files. That's because
these resources either are special (perf_ui) or are used in the
`device_mode_emulation_frame` which can't use `CSSStyleSheet` itself.
The files export an object, rather than a plain string. That's because
we need to be able to distinguish what string is referencing a CSS file
path and which strings contain the actual CSS styles. By using an
object, we can remain using the `typeof` check for string in the legacy
CSS infrastructure and otherwise destructure the object.
After this, we can remove perf_ui from the module.json structure and
properly bundle+minify the CSS resources.
R=jacktfranklin@chromium.org
Bug: 1190991, 1127902
Change-Id: I7523333e8025ae5fe5ed74b99b4e45907ff9ad97
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3275787
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-11-12 15:25:03 +00:00
Andres Olivares
8388f33735
Use case sensitive look up in build scripts to copy file contents.
...
These scripts check if a file exists and whether its content is
different from a source file before copying it. However the file look up
done with fs.existsSync() could be case-insensitive depending on the
underlying file system.
This CL implements the a case-sensitive file look up to compare against
the exact path name of the file being copied.
Bug: none
Change-Id: I0dc175c2292b3caea541a585562e8e25db637340
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3256666
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Andres Olivares <andoli@chromium.org >
2021-11-02 15:57:40 +00:00
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