Commit Graph
329 Commits
Author SHA1 Message Date
Philip Pfaffe 2e879471bc [build] add source urls to legacy CSS files
This makes debugging devtools styles much easier.

Fixed: 353448941
Change-Id: Iaea08580f9ad563b40f99a7f34da23055b4c8551
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5712990
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2024-07-17 07:43:20 +00:00
Alex Rudenko 4c70dd1644 Remove TypeScript globals
It looks like they all are part of TypeScript types now.

Bug: none
Change-Id: I517703732cf0ad88891981f7b9e402563dc6e47e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5643075
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-06-20 04:27:06 +00:00
Alex Rudenko 19c832a558 Fix tooling to pick up transitive dependencies
Bug: none
Change-Id: Ifc98fc5a9e40c2090f497e856bf978d76f93fb53
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5349136
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-03-06 13:05:13 +00:00
Benedikt Meurer 98daa89b1c [cleanup] Remove Platform.DCHECK.
This was originally introduced with https://crrev.com/c/2894390 but we
never started using it consistently. It also comes with the downside
that unlike in Chromium, for DevTools debug builds aren't used as
extensively and frequently, so it's better to stick to either throwing
an Error or console.assert() for the few cases where we used the
DCHECK() function in the past, and thereby ensure that we are notified
of the problems early on.

Bug: none
Change-Id: I90bd465d088be5530530027ea1dbd0ec2b74b12b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5319500
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-02-23 11:28:03 +00:00
Ergun Erdogmus 90810655c6 [Watch] Add legacy CSS support, update Chokidar config; log messages
We weren't doing anything for legacy CSS files, this updates to:
* Generate the correct output for them
* Log a message to the console to say that it won't be hot reloaded

Drive by:
* Log when there is a TS compilation error.
* Update Chokidar options to not use polling but use fsEvents.

Bug: none
Change-Id: Ib7edb62201447917bb7bfb5ba40cf137092c1009
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5125718
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2024-01-16 14:11:16 +00:00
Philip Pfaffe 9f9b531a71 Revert "Update esbuild"
This reverts commit 556d230a0e.

Reason for revert: Breaks the build on windows.

Original change's description:
> Update esbuild
>
> DISABLE_THIRD_PARTY_CHECK=DEPS needs to be updated together
>
> Bug: none
> Change-Id: I6af5660c313d5d998b320f688a36a1f3de5beb03
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5025093
> Commit-Queue: Randolf Jung <jrandolf@chromium.org>
> Reviewed-by: Danil Somsikov <dsv@chromium.org>

Bug: none
Change-Id: I331613611d0b8bd56a96a5eff50e452213f6f14b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5033272
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2023-11-16 07:34:14 +00:00
Junji Watanabe 8ec29f4349 [build] Fix devtools_module to propagate outputs to dependents
Similar to https://crrev.com/c/5028815,
`devtools_module` target also doesn't propagate the outputs of
`ts_library` to dependents due to having multiple targets.

This CL addresses this issue by setting `data` and `metadata`
in ts_library target.

DISABLE_THIRD_PARTY_CHECK=only build config change.
Bug: chromium:1501810
Change-Id: Id49410194c92455382942cbf3166ff793964991f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5028958
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-11-16 04:52:23 +00:00
Randolf Jung 556d230a0e Update esbuild
DISABLE_THIRD_PARTY_CHECK=DEPS needs to be updated together

Bug: none
Change-Id: I6af5660c313d5d998b320f688a36a1f3de5beb03
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5025093
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-11-15 15:27:58 +00:00
Junji Watanabe a6d3696757 [build] Fix devtools_pre_built to propagate outputs to dependents
"devtools_pre_built" template has 2 targets: copy_to_gen and group.
This prevents propagating the outputs of copy_to_gen to dependents.

This CL merged the two targets to one custom node_action with
copy-files.js script.

Bug: chromium:1501810
Change-Id: Id9eabb443d6306a8ffcb966c9246c57180825673
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5028815
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
2023-11-15 06:24:16 +00:00
Sandor Major ea1adcfc46 Create code-gen exemptions for 3P cookie deprecations
Bug: b:299640963
Change-Id: I3f88acb209115c06b1513c3acb568918323d4a9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4975830
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@google.com>
2023-10-26 15:02:12 +00:00
Alex Rudenko 67e3886186 Roll puppeteer-core
This roll requires a manual review. See http://go/reviewed-rolls for guidance.

In case of failures or errors, reach out to someone from config/owner/RECORDER_OWNERS.

Roll created at https://cr-buildbucket.appspot.com/build/8766374352283153121

R=devtools-waterfall-sheriff-onduty@grotations.appspotmail.com

Bug: none
Change-Id: Ib753eb31a685c2588a7b539dacf69fdc894311ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4968502
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-10-24 08:46:40 +00:00
Ergun Erdogmus 19ffe7f0bc Enable replacing CSS stylesheets on the fly after file change for watch script
This CL updates `generate_css_files` script and `watch` script to enable us to get CSS file changes instantly applied for non-legacy CSS files.

Drive by:
* Added an initial build step before starting to watch changes(1)
* Improved logs to include the time of the change.
* Updated `watch` listener to only get activated on `change` events.

(1) was something I was always missing starting this script.

You can try the behavior by:
* Running `npm run watch` and starting the watch mode.
* Opening the DevTools.
* Updating a non-legacy CSS file and expect to see the CSS change instantly on the opened DevTools.

Bug: none for now
Change-Id: I2aa3ed1b36584d1ef011119d5092d12271fb3017
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4922476
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2023-10-13 08:47:29 +00:00
Philip Pfaffe 468ab362b6 Shorten filename embedded by code_generator_frontend.py
The code generator embeds the last n entries of its own filename into
the generated InspectorBackendCommands. It used to be n=4, which
happens to create a different filename depending on whether the
script is run from a chromium or a standalone devtools-frontend
checkout. So set n=3.

DISABLE_THIRD_PARTY_CHECK=Updating code genrator

Bug: none
Change-Id: I09fad6d43377c8558709cbe41dba106f9c813caf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4852085
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2023-09-11 13:29:02 +00:00
Hadrien Jaubert 4c4ae29024 [Protocol Monitor] Add support for enums not defined via $ref
In some cases, the enums parameters are not referenced with $ref and there is just an array of all accepted values inside browser_protocol.json
This CL adds a typeRef inside the registerCommand for those cases.
DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1474336
Change-Id: I6239a90e225a54c3e884c59b3fbaea9f45eea92a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4793639
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-08-22 09:29:32 +00:00
Jack Franklin 9e787a5d89 Expand DevTools build system documentation
Updating the existing documentation and trying to make some of it a bit
more beginner friendly for those new to the codebase. Plenty more to
add, but this is hopefully a good start :)

Bug: none
Change-Id: I56a8651c7b774a6c8d46d1a2949970fb7272cc64
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4783322
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-08-17 11:10:38 +00:00
Alex Rudenko 6e435700ad Fix rollup plugin for DevTools
devtools-plugin for rollup should not treat code inside
Puppeteer folders as DevTools entrypoints. Only the `frontend/third_party/puppeteer/puppeteer.js` and `frontend/third_party/puppeteer-replay/puppeteer-replay.js` should be treated as entry points.

Fixed: 1470202
Change-Id: Ic9c6344f163bc23f5b1d04c936c0446bb07c4d0e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4765265
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-08-09 10:26:55 +00:00
Simon Zünd 7d525b4cc3 [build] Remove 'minify-html-template-literals' plugin from rollup config
R=alexrudenko@chromium.org

Bug: 1471374,1213034
Change-Id: Ia6ee0be69248904129b9e950f1e16f82013ec9b5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4765264
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-08-09 08:45:32 +00:00
Hadrien Jaubert e3454dba71 [Protocol Monitor] Change type of description inside registerCommand to string
DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1464499
Change-Id: Ib5ddda1635bb603fbcbc04a9c9d9ea6e53e364f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4678758
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
Reviewed-by: Nancy Li <nancyly@chromium.org>
2023-07-13 12:29:41 +00:00
Hadrien Jaubert d32b2acf8a [Protocol Monitor] Change type of description inside registerCommand to string
DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1464499
Change-Id: I1e376bafb5179e24d431e8a1118d24c642d89348
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4683137
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
Reviewed-by: Nancy Li <nancyly@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2023-07-13 10:34:34 +00:00
Hadrien Jaubert a511470fd6 [Protocol Monitor] Change python script to access the description of commands and parameters
DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1463211
Change-Id: I506bdd07805a0b481cd73ca0c31baf1dff7977e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4675888
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-07-11 13:17:30 +00:00
Hadrien Jaubert 04f758225d [Protocol Monitor] Add typeRef for strings in array parameters
We need access to the typeRef for array parameters. At the moment string type was not supported.
Moreover, the registerType only contains types relating to objects. This CL adds support as well for types directly relating to arrays.

DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1462270
Change-Id: I0375228a9315e35819c93e7deeb149121765f52b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4665825
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-07-06 08:09:06 +00:00
Hadrien Jaubert 17d2240ee2 Add registerType command for array parameters
The protocol Monitor needs to know the type of array parameters. To do this, the CL will add type reference to registerType inside the InspectorBackendCommands.js file. It is then possible to know what type of parameters array parameters accept.

DISABLE_THIRD_PARTY_CHECK=needed to build

Bug: 1462096
Change-Id: I623ef4fef1f49f7618f2a874490a515ce22ce1cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4660370
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-07-04 11:09:52 +00:00
Hadrien Jaubert 158c1fc712 [Protocol Monitor] Change python script to create registerType
This CL adds the ability to have access to a map enabling the user to have access to all the keys of object parameters. To do that, this CL modifies code_generator_frontend.py to generate a new command called RegisterType.

DISABLE_THIRD_PARTY_CHECK=make build work

Bug: 1458788
Change-Id: I28bf0baf3841cf3120d103e40925698d3c8114b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4650362
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-06-29 10:17:47 +00:00
Simon Zünd 6947220e25 [build] Extend devtools_release_sourcemaps to ESBuild bundles
DevTools has two ways to build release builds:
  * tsc + rollup + terser
  * and esbuild.

THe GN arg "devtools_skip_typecheck" decides which of the two
toolchains is used, as the esbuild one is much faster and enough
for the average Chromium developer.

Until now, the "devtools_release_sourcemaps" only works with the
rollup toolchain. This CL implements sourcemaps also for esbuild.

This means that "devtools_release_sourcemaps" now works
independently of "devtools_skip_typecheck".

This is convinient for dogfooding our own source map support in
DevTools: Now we can test against both rollup and esbuild with
DevTools-on-DevTools.

R=jacktfranklin@chromium.org

Bug: 1430396
Change-Id: I54849764a26f3fb539535eccdde7a79f9fd00d5f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4654605
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-06-29 08:48:01 +00:00
Hadrien Jaubert cafa2786f7 [Protocol Monitor] Add support for array parameters
This CL adds the ability to edit array parameters in the Protocol Monitor. To do that, this CL modifies code_generator_frontend.py to  report the array as a parameter type. Runtime type checks in InspectorBackendCommands.js are modified to account for the new parameter type.

DISABLE_THIRD_PARTY_CHECK=needed to build correctly

Screenshot : https://bugs.chromium.org/p/chromium/issues/detail?id=1457512

Bug: 1457512
Change-Id: I368c0146975d95fa024d59f4fb3e7d4ab590722d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4640225
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-06-27 13:13:08 +00:00
Alex Rudenko 6a4b64d675 Remove special treatment for puppeteer by rollup
And by accident the special treatment for puppeteer-replay.

Fixed: 1455094
Change-Id: Ia80fbd62e5389133e7c38717365d772a94fb5585
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4637784
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-06-23 04:32:02 +00:00
Ari Chivukula 9303e842f5 [Deprecations] Keep metadata after usage period has passed {devtools}
We need to retain the metadata for deprecations past the point where
they are no longer dispatched on stable. This provides a way to turn
codegen off at the same time as we note the milestone when the metadata
can be safely removed.

Bug: 1451772
Change-Id: I9fb9ef4b8fbecaa2fb8d14ad65016102387bf722
DISABLE_THIRD_PARTY_CHECK=Testing codegen changes
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4594037
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-06-07 08:31:19 +00:00
Mathias Bynens 12708639c7 Remove custom escaping logic in favor of json.dumps
As of ES2019, JSON ⊂ ECMAScript [1], meaning we can use JSON
serialization to embed string literals into JavaScript programs.
This eliminates the need for any custom string escaping logic,
since we can simply use `json.dumps` now.

[1]: https://v8.dev/features/subsume-json

DISABLE_THIRD_PARTY_CHECK=added missing escaping to *.json5 file https://crrev.com/c/4401593

Bug: chromium:1411444
Change-Id: I9f0c5b2dfa218951bcb0d31432c9484666307f7d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4402896
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
2023-04-05 13:42:58 +00:00
Simon Zünd 3a67337d3a [build] Add source maps for release builds
This CL adds a new GN flag "devtools_release_sourcemaps" (off by
default.. When set, we'll instruct rollup to generate source maps for
the bundles. This means that every entrypoint, e.g. 'common.js', now
has a corresponding source map ('common.js.map').

We also use 'rollup-plugin-sourcemap'. It is responsible for consuming
the source maps generated by the TypeScript compiler and merge them
with the source map produced by rollup. This allows us to still
debug on the level of TypeScript files even for minified release
builds.

R=jacktfranklin@chromium.org

Fixed: 1430396
Change-Id: I3a0f94dc722f19d066725aef3544652c6a19c95a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4402891
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-04-05 08:02:45 +00:00
Ari Chivukula 52c774ad47 [Deprecations] Fix devtools string escaping
I noticed that in c++ I had to manually add an extra backslash to escape
the message in codegen, so I checked and saw that in:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/generated/Deprecation.ts;drc=6b47192b2e719a562ef1a88e19bc7572e6a187ab;l=16
CanRequestURLHTTPContainingNewline had `\(n|r|t)` as part of the
message, but that once the string was extracted in:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/third_party/lighthouse/locales/en-US.json;drc=de6c4e5973980ad98d7d1699faa4e1059f102c4d;l=2120
it became `(n|r|t)` because \( isn't a valid javascript escape.

I added the same fix I did in c++ and replaced \ with \\ in the codegen
to preserve the intended escape that's lost in the python string decode.

Bug: 1411444
Change-Id: Iead1a2909a63eba3ea39c5f0524c63fb532534de
DISABLE_THIRD_PARTY_CHECK=Fixing codegen
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4240938
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
2023-02-10 20:17:24 +00:00
Ari Chivukula 6b47192b2e [Deprecations] (5) Replace browser_protocol.pdl enum {DEVTOOLS}
This is a reaction to the change from
https://chromium-review.googlesource.com/c/chromium/src/+/4226621

If you want to wait for
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227697
To go in and have me rebase that's fine.

This CL is part of a series:
(1) Add deprecation.json5 file
(2) Add existing deprecations to deprecation.json5
(3) Copy deprecation.json5 into devtools_frontend via update flow
(4) Update README to reflect devtools codegen
(5) Replace browser_protocol.pdl enum
(6) Codegen c++ code

Bug: 1411444
Change-Id: Ia38af483be2ec52cd5a709deb69313271c1c9464
DISABLE_THIRD_PARTY_CHECK=The protocol changes force codegen changes
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4231800
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
2023-02-08 18:15:29 +00:00
Simon Zünd 2ce6754100 Auto-generate deprecation info from rolled blink file
We now roll a "deprecation.json5" file from blink into DevTools that
serves as the canonical source for deprecations: It contains the
english message + note for translators as well as additional
metadata such as milestone and chrome feature number.

To use the .json5 in a somewhat type-safe way, we generate
TypeScript that is type-checked against the DeprecationIssueType
from CDP.

Note that we also generate a standard UIStrings structure that
we'll import in "DeprecationIssue.ts". An alternative would be to
collect to strings directly from the .json5 but that would
complicate "npm run collect-strings" as we'd have to teach those
scripts how to parse the .json5.

DISABLE_THIRD_PARTY_CHECK=Add newly generated file
R=alexrudenko@chromium.org

Bug: 1411444
Change-Id: Ifcfd4291ebfc3a70c100ba4a5fbefc485d4a5493
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227691
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-02-07 11:06:16 +00:00
Alex Rudenko 71be973357 Use correct autoninja filename on Windows
See https://docs.python.org/3/library/os.html#os.name

Fixed: 1411728
Change-Id: I57498dace944d655cfd6cc1f4423dfc8cfd415e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4217072
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-02-02 11:00:16 +00:00
Jack Franklin a682d93584 Re-enable cssnano with "lite" preset
We had to disable CSSNano because it was causing broken fonts in release
builds (exact reason TBC). This CL installs the `cssnano-preset-lite`
package which applies only the following optimisations:

1. remove whitespace
2. remove empty rules (e.g. `div{}`).
3. remove comments

This should be far less risky and unlikely to cause unexpected
breakages.

DISABLE_THIRD_PARTY_CHECK=installed & used cssnano-preset-lite in the
same CL.

Bug: 1399763
Change-Id: I7fdd8b70b02a2c1a5e1c71a87c7ba145114e6e4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4111923
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-16 12:38:30 +00:00
Alex Rudenko e477438529 Disable CSS minification
The new minifier seems to break CSS in the subtle way (different font is used in release builds) and it prevents the roll [1]. changhaohan@ bisected the failure to css-nano rollout. I think a potentially increased binary size is better than a broken roll or bugs, so I suggest we disable CSS min for now.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/4105761

Bug: none
Change-Id: Ie663f4d3b048b9e1e5e6f84bce296e169a5a3203
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4104382
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-12-14 11:33:47 +00:00
Jack Franklin 5e0a670680 Fix generate_css Ninja input
Now we are using CSSNano, not clean-css, this input needs to be updated
before we remove clean-css from the build.

Bug: 1399763
Change-Id: I2adc192d9f79bc99df7dd1a178e4bdb3c5e3feeb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092736
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-12-09 15:17:11 +00:00
Jack Franklin c712a3e629 Move generate_css_js_files to use cssnano
Bug: 1399763
Change-Id: I96964df8eb6c8979d5f208aa442687c439acaa7b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092364
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-12-09 12:57:29 +00:00
Jack Franklin 43f33bfab5 Add tests for generate_css_js_files script
No functional changes here - but we will be making changes in the future
to this script, so I think adding a few tests is a good idea.

The changes to the source code are purely to allow the relevant function
to be tested easily, and there are no actual output changes here.

Bug: 1399763
Change-Id: I7fec01f62ea2b034b175071aa1dd92a9d3df51b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092303
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2022-12-09 10:58:02 +00:00
Jack Franklin df0e9312aa Add ESLint rule for commented out import statements
This is something I've been caught out with a few times when moving code
round, and thought it would be a good ESLint rule. I've enabled the rule
as part of this CL as we currently have few issues that need fixes.

Bug: none
Change-Id: I72c6aad3e4258fbda280e062f98823a068c6bfc8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4076326
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-05 11:24:51 +00:00
Simon Zünd 50dcea80fa [l10n] Use generated en-US.json/en-XL.json
This CL switches out the in-tree versions of en-US.json/en-XL.json
in favor of the versions generated at build time. They are identical.

The implementation is straight-forward. On the minification step, we
exclude the in-tree en-US.json/en-XL.json and instead add the
outputs of the "collect_strings" action (aka the generated en-US.json/
en-XL.json).

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I923fba50033305a7df6bedccf65c657ecc8e5235
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4043247
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 08:51:46 +00:00
Simon Zünd d481608a05 [l10n] Remove src directory parameter for minification script
Instead the input sources should specify their path completely.
This allows us to also include generated inputs.

Note that all sources will still be put into a single output
directory, namely $target_gen_dir/core/i18n/locales.

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I203f284f74cb468ebe44c22e5d594f1b6cb182e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4042782
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 08:17:39 +00:00
Simon Zünd c6be86815b [l10n] Don't comma separate files passed to the minification script
Just a small refactoring to go with the standard way of passing
each file as a separate argument instead of doing a join + split.

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I5a292053e1138448e8a1e7a09162b248d6851a25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4042209
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2022-11-21 12:14:02 +00:00
Jack Franklin 130d2ae03b Disable clang/eslint in front_end/generated
This CL disables formatting within the `generated` directory, which is
all code that is programatically generated. Previously we disabled
eslint for `protocol.ts`, but now we are being consistent and disabling
it (and clang) for all files.

I also re-generated the files in the generated folder, so we avoid any
confusion if/when the generated scripts get re-run and suddenly the
format drastically changes.

DISABLE_THIRD_PARTY_CHECK=changing generated files + config

Bug: none
Change-Id: I714ada8bf7d85020e3be71b35c9db98840bf3ef2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3755163
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-07-12 10:51:50 +00:00
Richard Wang efcbd38590 typescript: Fully replace devtools_use_rbe with devtools_use_remoteexec
BUG=chromium:1247781
DISABLE_THIRD_PARTY_CHECK=Update devtools_entrypoint simultaneously rather than making yet another CL

Change-Id: Id85a820f0ab30a46d0631c6e5581a88c206fa8f9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3694875
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-06-10 12:01:23 +00:00
Philip Pfaffe 17a9f74a71 Don't build wasm module test inputs in the chromium tree
We currently don't check out emscripten in the chromium tree, so disable
inclusion of the modules that would call emscripten tools in that case.

Bug: none
Change-Id: I7e69d87da6af7a198f6a509a1d2a2b02d6d94341
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695365
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2022-06-10 09:55:03 +00:00
Philip Pfaffe e29b186fe5 Generate inputs to wasm tests from wasm text
This CL introduces support for writing inputs to wasm tests in wat
format. This will allow removing dependencies on opaque binary resources
that can't be regenerated without changing hardcoded offsets in all
tests. Referencing binary and/or source file offsets will now be
possible through special comments left in the wat source.

Bug: 1328729
Change-Id: I6369c86ca57860fd9803b894797f63c36c65d554
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3666419
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-06-09 17:12:02 +00:00
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