Commit Graph
170 Commits
Author SHA1 Message Date
Rob Paveza 41120592d3 Refactor of the 'copy_all_modules' build step
I've sporadically seen the same CreateProcess failure in ninja recently
that we'd been seeing for the GRD script [1]. This failure is related to
the copy_devtools_modules script.

As part of this change I've also corrected some linting errors that I
had made with the previous fix.

[1] The previous fix can be found at
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319

Change-Id: Ic9a66160acddfc929fdd43f20572435ceff3724c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1997723
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-13 19:07:47 +00:00
Simon Zünd 5a8f4d89e1 Revert "Migrate accessibility/ to ESM internally"
This reverts commit 785c6a4f1c.

Reason for revert: Suspected to break "run_type_check.py" on the bot.
https://ci.chromium.org/p/chromium/builders/try/linux-rel/279842

Original change's description:
> Migrate accessibility/ to ESM internally
> 
> Bug: 1006759
> Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ie4fe54b84cf91cd034bfdb21c20b97eaacdb3599
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006759
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994960
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-01-10 06:01:18 +00:00
Paul Lewis b4e2a0741b Check for self.X = self.X || {} in migration script
Bug: 1006759
Change-Id: I741093c412e6ef47b0154b0202bda56ffd07328c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993460
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-09 17:11:01 +00:00
Paul Lewis 785c6a4f1c Migrate accessibility/ to ESM internally
Bug: 1006759
Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-09 17:06:11 +00:00
Tim van der Lippe 472675db85 Migrate data_grid/ to ESM internally
Bug: 1006759
Change-Id: Idb20304bcf3e72e4a0bba242e847e90ff9b8a8c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993342
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-09 15:04:51 +00:00
Liviu Rau e5cecd6c52 Revert "Whitespace to trigger builders"
This reverts commit 3aa0411a4c.

Reason for revert: To trigger builders

Original change's description:
> Whitespace to trigger builders
> 
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>

TBR=machenbach@chromium.org,sigurds@chromium.org,mathias@chromium.org,liviurau@chromium.org

Change-Id: I133c6f3e3bdb86884c13ab41b6c82be3064d882d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991509
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2020-01-09 12:05:43 +00:00
Liviu Rau 3aa0411a4c Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-09 11:35:52 +00:00
Rob Paveza 4947355c94 Fix for too-long length of command line in Windows build.
Apparently related to the changes to ESM, the Windows build command
line has started to exceed 32kb. This is running into a fault within
ninja in which the call to CreateProcess fails as a result of the
command line being an invalid parameter.

This fix addresses it by dumping the file list into a GN "response
file" which is then fed into the corresponding Python script, as
indicated by the GN docs. See:
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_response_file_contents

Bug: 1040233
Change-Id: Ie421a09d2a23756e9195e3ad84b941187de6e3c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
2020-01-08 22:17:55 +00:00
Tim van der Lippe 0c21af5553 Use module scope for workers
This changes the Common.Worker to create Workers that use the module
scope rather than the global scope. It allows us to use es-imports,
which consequently allows us to remove the bundling during the build
step. This should hopefully improve the Ninja non-determinism that we
were facing when making changes to files that are used in the various
workers.

Bug: 1006759
Change-Id: I7ac209817b1576d2accd790f1bf7ef6a658f5605
Fixed: 1013129
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981615
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-08 15:12:05 +00:00
Liviu Rau 5dfaec1dad Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Id2b4cab8b2f1176ff6c7221826c5ecbbb5315126
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967164
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-08 09:46:13 +00:00
Paul Lewis 25b001799e Adds known errors to include expanded namespace
Dupes the known errors for the Common.UIString.UIString namespace to
match the existing Common.UIString case.

Bug: 1006759
Change-Id: Ibf5a7ec632d43fca56d198b05a93ca6e79621388
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985675
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 16:25:44 +00:00
Paul Lewis d0015fb415 Adds support for additional localization calls
As part of the ESM migration, certain function needs to be renamed over
to a different namespace, e.g. Common.UIString becomes
Common.UIString.UIString. As such the script that looks for instances of
Common.UIString for localization fails to identify instances of the
updated calls to Common.UIString.UIString. This CL updates
localization_utils so that it is aware of the updated namespaces, but
treats them in the same way as their legacy counterparts.

Bug: 1006759
Change-Id: I0a7da9109ee969da4caac3283c4ff26f4589f68a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985674
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 15:37:33 +00:00
Connor Moody 46dee06f38 Normalize excluded file paths in check_gn.js to fix presubmit checks on Windows
CL http://crrev.com/c/1969473 introduced the check_gn script to augment presubmit checks. The checks are currently failing on Windows because excluded file paths (formatter_worker/) are not normalized.

This CL normalizes excluded file paths so that all checks pass on Windows.

Change-Id: Ic5848d6eb9706934152445e4b5752be25ac84e07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1974795
Reviewed-by: Brian Cui <brcui@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Connor Moody <connor.moody@microsoft.com>
2019-12-19 17:18:48 +00:00
Tim van der Lippe ac961dd56b Fix check_gn and add it to check script
check_gn will now properly check the contents of all_devtools_modules and copied_devtools_modules in the BUILD.gn.
We don't ship the wasm_source_map/types.js, as it only includes information for Closure.
Therefore, remove this file from the `modules` array and append it in Closure instead.

Fixed: 1033882
Change-Id: I3361096941869d39ce3b717327c4001d146a5286
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1969473
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 14:29:28 +00:00
Michael Achenbach ebb091f654 Whitespace change to test build numbers
Tbr: santa
Change-Id: Id86ddf8253e7269448d0170af4dd3c8fd71e14de
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967165
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-12-16 08:43:56 +00:00
Mathias Bynens f885d2e6f8 Prefer Brotli over gzip for compressing webui resources
This makes resources.pak another 228.1 kB smaller (from 7,070,021
bytes down to 6,841,901 bytes).

Bug: chromium:1025041
Change-Id: I0d45e3b40f5765bcb5c2266750698d33b6adcae2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1964350
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-12-12 14:36:14 +00:00
Mathias Bynens 4d4e51aa31 Set compress='gzip' for SVG resources
This saves some more bytes in the total image size, which is important for Chrome OS.

Follow-up to:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736

Bug: chromium:1025041
Change-Id: I01167d35ae6d693428dfd44252b7f86940f416b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962301
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-12 13:41:04 +00:00
Steven Bennetts 457ff4a215 Set compress='gzip' for webui resources
This adds the compress="gzip" entry to webui (html, js, css) files in
devtools_resources.grd.

This will save 4.8 MB in the image size, which is critical for
Crhrome OS.

Bug: chromium:1025041
Change-Id: I0357fc1cc677f83f1f36fb39ca586543e37d124c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-12-12 12:54:23 +00:00
Liviu Rau 7ea9d9dd0f Whitespace to trigger builders
TBR:yangguo@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I25417f546ff76ad6b3a10a7d29ee823b0bc3fa73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962294
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-12-12 11:06:03 +00:00
Changhao Han b8b4fef645 Autogenerate CSS autocomplete values with extra manual entries.
Bug: chromium:1021810
Change-Id: Ifd6ed31b31c61fc5b509ffe049d961cc68e7bcc4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953616
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2019-12-11 15:38:04 +00:00
Paul Lewis 26afc1e4f9 Adds migration script for refs
This script expects that -legacy.js files are in place for a
given module. So, for example, if migrating front_end/search
one would run move-side-effects-to-legacy for search, then follow
that with this script, replace-internal-references, which will
step through the files in front_end/search and update all globals
to refer to imports.

This script also supports cross-module rewrites, such that if a
namespace is passed through, the -legacy.js file for the namespace
will be loaded instead and used for the replacements.

Bug: 1006759
Change-Id: I7af5e1343a028aed82d5c3f536be886011cf9a2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958525
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-10 13:47:05 +00:00
vidorteg 7a077810bd Updating paths on generate_devtools_ui_strings.js
Localization scripts got moved from localization_utils to
localization/utils, this script needs to be updated to reflect the
change.

Change-Id: I0a942d928687e3df767e508b25a286be026f0dcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1959090
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2019-12-10 00:11:50 +00:00
Liviu Rau a2b38b373d Whitespace to trigger builders
TBR:machenbach@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ia6de0ba985089efa56580f40a1c28a89f77d8cdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958984
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-12-09 21:46:42 +00:00
Mathias Bynens cdcfba01d1 Restore npm run check-json functionality
Without this patch:

```
$ npm run check-json

> chrome-devtools-frontend@ check-json ~/projects/devtools/devtools-frontend
> node scripts/json_validator/validate_module_json.js

schema id ignored http://json-schema.org/draft-04/schema#
schema id ignored http://json-schema.org/draft-04/schema#
~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:92
    if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
            ^

Error: no schema with key or ref "http://json-schema.org/draft-04/schema#"
    at Ajv.validate (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:92:19)
    at Ajv.validateSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:173:20)
    at Ajv._addSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:306:10)
    at Ajv.addSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:136:29)
    at Ajv.addMetaSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:151:8)
    at Object.<anonymous> (~/projects/devtools/devtools-frontend/scripts/json_validator/validate_module_json.js:20:5)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
```

After applying this patch:

```
$ npm run check-json

> chrome-devtools-frontend@ check-json ~/projects/devtools/devtools-frontend
> node scripts/json_validator/validate_module_json.js

schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
```

Fixed: chromium:1030215
Change-Id: Ie799ffbc9dfe50bdfedb18a0d9ac2ce63a9e4439
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953774
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-09 14:28:12 +00:00
Paul Lewis da0fab38e1 Adds migration script to moving side-effects to legacy file
TBR=tvanderlippe@chromium.org
Bug: 1006759
Change-Id: I145e029b427900995468e86a522085553cb5c1cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953769
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-12-09 10:59:22 +00:00
Yang Guo a711c06b43 Remove outdated extract_module script
Change-Id: I1b9d525baf83398959ecf8df34ab50ca5c695ee0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1950168
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-04 14:49:15 +00:00
Yang Guo 6e99c7c542 Move test and localization scripts
R=tvanderlippe@chromium.org

Change-Id: I9bfa77ef2791638b07089e4faf405f834ff47148
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947525
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-12-03 16:48:56 +00:00
Paul Lewis c523feb710 Updates unit tests to use new devtools_paths
Change-Id: Id076878f5f51348ff80ce1adc018b148246c087f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947527
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-12-03 10:53:56 +00:00
Paul Lewis e8d888e39d Defaults the number of boot perf runs to 37
Change-Id: Icb57c9b3c116f01eeeadeca184864085edd008db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947526
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2019-12-03 10:44:46 +00:00
Paul Lewis 449ac187cb Adds manual boot perf script
This script loads the DevTools frontend in hosted mode and waits for the
elements panel to appear. After this it calculates the mean and median
boot times and logs them out.

Bug: 1027519
Change-Id: I01094a95d5178bbf60f964a5c26e92efa604b1e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942287
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-03 10:32:56 +00:00
Michael Achenbach 75ba8e350e Add some infra ownership
DISABLE_THIRD_PARTY_CHECK=true

Bug: 1026215
Change-Id: I068203abb73369aab71c2b9869b984373fe0f8c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1946474
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-12-02 20:34:58 +00:00
Paul Lewis e184c4c207 Adds license checker
This CL adds license-checker to manage_node_deps.

Change-Id: Ia525e9c2380fc2654e9903ecc7fd4e94cdce1f9a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944866
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:39:54 +00:00
Paul Lewis 66e1206c8b Updates manage_node_deps to install missing deps; adds yargs
The `npm ci` call in the script will fail due to any mismatch between
the DEPS declared and those listed in the package-lock.json file.

This CL updates the script to install any missing deps by comparing the
list in package-lock.json with the DEPS, and adding any that are
missing.

Yargs is needed for the boot perf benchmark, so adding its DEP here
and will update the node_modules directly in a future CL.

Bug: 1027519
Change-Id: Ifbc69b242d0cfc4d79d23f756f267a5a2f45039f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944861
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:09:24 +00:00
Tim van der Lippe 5e2f45a379 Add script to remove unused globals
It Traverses all expression statements that put stuff on the global
scope and checks if it is only used once (e.g. in that particular
assignment). Anything that is only exported but never used is deleted.

This works for extensions declared in the module.json as well.

Change-Id: Ie3d9759da8593f8c66f1c12ba2e8ee1724f240d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942289
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-28 17:40:34 +00:00
Mathias Bynens 98669996bf Fix npm test when run from the devtools/devtools-frontend repo
The script previously assumed it would always be run from within the
chromium/src/third_party/devtools-frontend/src folder. It would fail
when run from the standalone repository at devtools/devtools-frontend.

This patch makes it work even in that case, as long as the `devtools`
directory in `devtools/devtools-frontend` lives on the same level as
the `chromium` repository.

Change-Id: I3cf81c8144fd3f03389a4ec395b8ec3acdbb8e55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1939798
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-28 11:43:53 +00:00
Paul Lewis d903909f9c Updates deps script; adds Puppeteer
This is a prequisite for loading DevTools in hosted mode and track how
long it takes for the FE to boot up. This CL adds Puppeteer to the deps
as well as tidying the manage_node_deps script some.

Bug: 1027519
Change-Id: Ie5f3ef47f481972c721f7382f9b0ed99d287d07c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1939800
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-11-28 10:40:33 +00:00
Tim van der Lippe e6974cd0ab Fix duplicate skip_compilation files
modular_build can compute all skip_compilation files, which saves us
some duplication run_type_check

Bug:1006759
Change-Id: Id8eff10fa716f7cb17d36aa18b54605f26dba713
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934219
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-27 16:16:43 +00:00
Tim van der Lippe 5958eb836f Migrate cm_modes/ to ESM
This also makes cm_modes/ non-remote and uses proper dynamic imports to
load the code (rather than an `eval`). This increases the binary size by
104 KB from 11756K to 11860K which is an increase of 0.8%.

The stylus cm_mode has been removed. This mode was the largest mode
(30KB), seems unmaintained [1] and this syntax is likely rarely used (if
at all). It is unclear how often the other modes are installed and used.

Additionally, I discovered a promise race in the plugin installation. In
the full application this is not noticeable, as by default all code
mirror modes are lazily loaded (verified they still work with Markdown,
Java file and the regular js/cc files). However, in the test it was not
properly awaiting the plugin loading.

Perform the async-await plumbing to make sure the promise is resolved
before the test continues execution.

roll CodeMirror

[1]: https://github.com/codemirror/CodeMirror/commits/master/mode/stylus

Bug:1006759,1011466
Change-Id: If4d81d01318e08a63faaffee8b0cc9ab5954d4c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928924
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-27 14:58:02 +00:00
Tim van der Lippe d1cfda327d Migrate text_editor/ and cm_web_modes/ to ESM
cm_web_modes/ was used both in a worker and in the normal browser
context. However, both formatter_worker/ and text_editor/ included the
relevant files in their scripts array.

The fix is to make cm_web_modes a proper module and import either the
browser (_cm.js) variant or the worker (_headless.js) variant.

Bug: 1006759
Change-Id: I85c6f67102d8ffd94e073850b1ac7adcb289b1b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934218
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-27 14:12:52 +00:00
Liviu Rau 38acde4f55 [devtools] Whitespace to test devtools recipe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1018837
Change-Id: Id606852ee0c9cf3df215866a08183f479cfc7157
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903467
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-11-27 12:48:29 +00:00
Andrey Kosyakov fff69a79f9 Reland "Update roll & type check scripts with new browser_protocol.pdl location"
This reverts commit db38f98828.

Reason for revert: re-landing as upstream change appears to stick this time.

Original change's description:
> Revert "Update roll & type check scripts with new browser_protocol.pdl location"
> 
> This reverts commit a4d8446198.
> 
> Reason for revert: Upstream change that this depends on got reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1935479
> 
> Original change's description:
> > Update roll & type check scripts with new browser_protocol.pdl location
> > 
> > This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
> > to update the location of the browser_protocol.pdl.
> > 
> > NOPRESUBMIT=true
> > Bug: https://crbug.com/1018108
> > Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> 
> TBR=caseq@chromium.org,yangguo@chromium.org
> 
> Change-Id: I276ca14aa57ed6dcfd76946c8bee9ea580643b6b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://crbug.com/1018108
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1936211
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>

TBR=caseq@chromium.org,yangguo@chromium.org

Change-Id: Icb1d908317514f15a80fb8edc84974045309487e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://crbug.com/1018108
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1938351
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-11-27 01:32:58 +00:00
Paul Lewis ea12f14458 Migrates javascript_metadata/ to esm
Bug: 1006759
Change-Id: I91c9f30d63e36995e7fa14b49072f2dcc6c37af6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1937028
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-26 17:16:06 +00:00
Yang Guo db38f98828 Revert "Update roll & type check scripts with new browser_protocol.pdl location"
This reverts commit a4d8446198.

Reason for revert: Upstream change that this depends on got reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1935479

Original change's description:
> Update roll & type check scripts with new browser_protocol.pdl location
> 
> This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
> to update the location of the browser_protocol.pdl.
> 
> NOPRESUBMIT=true
> Bug: https://crbug.com/1018108
> Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
> Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>

TBR=caseq@chromium.org,yangguo@chromium.org

Change-Id: I276ca14aa57ed6dcfd76946c8bee9ea580643b6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://crbug.com/1018108
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1936211
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-26 09:37:09 +00:00
Andrey Kosyakov a4d8446198 Update roll & type check scripts with new browser_protocol.pdl location
This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
to update the location of the browser_protocol.pdl.

NOPRESUBMIT=true
Bug: https://crbug.com/1018108
Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-26 00:34:04 +00:00
vidorteg 75c025e894 Reland "Do not require arguments to run run_localization_check.py"
Relanding a PR that was disabled due exposing a bug in esprima
that has already been addressed in:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277

Bug: 1027052
Change-Id: I7262f01b545b7d8ab49cd6e8853f9f232b3d72e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1929110
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-25 19:26:14 +00:00
vidorteg 2b675b05ee Reland "Revert "Adding run_localization_check.py""
This change relands Adding run_localization_check.py which exposed
a bug in esprima that has been fixed in here:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277

Bug: 1027052
Change-Id: I93a406a15cf5ba21b3a594e8a8593e49518c9a90
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931279
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-25 18:08:44 +00:00
vidorteg e3e3cdb826 Excluding JSON files from check_localizability.js.
Root:
Esprima has a bug parsing JSON files that contain string literals as the
name, even though it is valid according to the JSON standard
http://www.json.org/

Expected:
Parsing the following snippet should not throw an error
{
    "name":"value"
}

Actual:
Unexpected token ":"


Fix:
Exclude json files from being parsed by esprima


Bug: 1027052
Change-Id: Ic3c4786af36511852c9729b8313a370d32b654df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
2019-11-25 17:56:54 +00:00
Paul Lewis cf2ef223cd Migrates audits/ to esm
Bug: 1006759
Change-Id: I3725508476779ed9002ace9f2c5bf57aaeb0b2c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928919
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-11-22 15:25:31 +00:00
Michael Hablich 7fa83680cc [Infra] Whitespace change for testing
Bug:1021467
Change-Id: I1544fda08001fa5b3613c2224794f70d30865b3d
TBR=yangguo@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928912
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
2019-11-21 10:05:54 +00:00
Paul Lewis 954a5a9d92 Revert "Adding run_localization_check.py"
This reverts commit 402078e2f9.

Reason for revert: run_localization_check.py breaks the PRESUBMIT for any CLs which contain json files, i.e. module.json.

Original change's description:
> Adding run_localization_check.py
> 
> It will run the two localization verifications:
> - It will tell if the resource files are formatted in the correct way
> - It ill tell if any localizable resource in the code is present with the
> appropiate attributes in the resource files.
> 
> This two verifications already run as part of the presubmit verifications,
> I did some refactoring to allow them to be run from an external script.
> 
> Change-Id: I340e5dcfdeef7331a757adf27cef94e22302cf10
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1894913
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>

TBR=lomitch@microsoft.com,vidorteg@microsoft.com

Change-Id: I0f2dfa1e071a0302414cf38ccbdf86ca772b3ec1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1926496
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-20 15:34:28 +00:00