Commit Graph
446 Commits
Author SHA1 Message Date
Benedikt Meurer 6860b5971b [wasm-debugging] Drop experimental out-of-progress language plugin
The out-of-process language plugin is no longer actively developed
and the design is considered insecure, so remove that from the tree
now.

Bug: 1083146
Tbr: tvanderlippe@chromium.org
Change-Id: I5fdb29fb070c6171202177b675f50f3b5fc1042e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282342
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2020-07-06 07:32:42 +00:00
Tim van der Lippe 5095a02a94 Use devtools_entrypoint for elements/
This allows us to introduce the bridges files as imports into elements/
which uses Rollup and terser. This makes sure the minifier will not
mangle away the HTML template tags, as well as properly minify the
content of the TypeScript implementations of a custom element.

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

Bug: 1011811, 1061037, 1101738
Change-Id: Iaa1318c20f6d37c5aad97955f48ac16dacef246d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2277994
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-03 10:17:08 +00:00
Peter Marshall 0b95ea162f Update Mocha to 8.0.1
Breaking changes here https://github.com/mochajs/mocha/releases/tag/v8.0.0
seem fine.

DISABLE_THIRD_PARTY_CHECK=Update Mocha

Bug: chromium:1101784
Change-Id: Idc75c94f9a923e2b0ca13d1d1331540cb1c5d3a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279830
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-07-03 09:50:38 +00:00
Tim van der Lippe f171bbbae0 Add @rollup/plugin-commonjs to NPM dependencies
DISABLE_THIRD_PARTY_CHECK=Add NPM dependency

R=vidorteg@microsoft.com

Change-Id: I3fb90b1f4c661125a1b71129fdc45c688dc018ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279833
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
2020-07-02 17:56:00 +00:00
Tim van der Lippe 28d76057f3 Fix dependencies for Rollup action in devtools_entrypoint
When a file change was made to a file that was bundled in Rollup,
it would not properly retrigger the Rollup action. That can be
fixed by explicitly adding the `invoker.deps` to the Rollup action.

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

Also-By: aerotwist@chromium.org
Bug: 1098730
Change-Id: Ic52e2ba7bb9c998b1444b2b5b65bdd4aff767e96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279832
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-02 17:12:30 +00:00
Paul Lewis ee1b328d6a [Watch] Changes autoninja target
We are building the :front_end target when files change, but this
doesn't seem to be broad enough to ensure we build on all changes. This
CL updates the target to devtools_frontend_resources, which does seem to
be a broader target.

This CL also includes a drive-by fix so that the output is sent to
stdout.

Bug: 1098694
Change-Id: I1d02cc0226767377aa4729af3cf3a734ec774026
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2278471
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-02 10:59:39 +00:00
Tim van der Lippe 60421845f4 Implement devtools_entrypoint
Port formatter_worker to use devtools_entrypoint, which is the abstraction
around `rollup`. It handles the creation of the rollup bundle, but leaves
it alone if you are building with `is_debug=true`. This way, we can keep
development use the existing workflow where individual files are fetched,
while in release mode we bundle the entrypoint into 1 big file.

In the future, anything we consider an entrypoint must use this method.
This would include third_party packages like lit-html and CodeMirror.
A follow-up CL will move the lit-html entrypoint back into
third_party/lit-html, as we no longer require it to be a direct subfolder
of `front_end/` (that was fixed in
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2270168)

DISABLE_THIRD_PARTY_CHECK=TypeScript fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1098730
Change-Id: I5d2e67cc9c71291e8b67bbc29354e75239aae9a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2267001
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-02 10:08:19 +00:00
Tim van der Lippe 9f3b52b677 Extract external module computation into rollup.config.js
This allows us to remove the pre-computation of the external modules
from the Python script, into the Rollup module. This is a necessary
change for the future, where we can define an entrypoint in any
location. This could be in a folder which is not a direct
sub-folder of `front_end`.

To do so, we operate on the assumption that the directory that the
input file is in, is the entrypoint. If you resolve an import that
is in that directory or in a subdirectory, we treat it as internal.
If it is outside of that folder, we treat it as external.

This largely mimics the implementation of the ESLint rule for
ES modules.

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

Also-By: janscheffler@chromium.org
Also-By: alexrudenko@chromium.org
Bug: 1098730
Change-Id: I416b4c9cd9997b9fc2a50aea41077c41fea59af0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2270168
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-07-01 12:08:59 +00:00
Tim van der Lippe 2a908b9501 Run terser minifier as part of rollup_entrypoint
We are not running the minifier as part of build_release_applications.py,
as the build performance would be significantly worse. We don't pay that
high of a price with `rollup_entrypoint`, as Ninja will not rebuild if
it is not necessary.

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

Fixed: 1084578
Change-Id: Id18fb826aef33c9efddfe390a62eec69485c6295
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2256989
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-01 12:00:39 +00:00
Tim van der Lippe 14cfc426ea Fix rollup inputs for restat computation
A Rollup action takes an entrypoint as input. However, we did not
specify this input explicitly in GN. This could then lead to
non-deterministic build failures, if a subsequent change to a
target using the `rollup_entrypoint` template would trigger a build.

To make sure that GN understands that the entrypoint is an input,
we have to add it to the `inputs` array of the target.

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

Bug: 1011811
Change-Id: Idf03693575f68ea8fe06a2df10f895c4416bfe5c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2276265
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-01 11:28:29 +00:00
Christy Chen 465b102104 [Loc] Fix <LOCKED> and <ex> get removed when messages move across grdps
When the presubmit moves a message from one grdp file to another, the <ph name=LOCKED> and <ex> tags are lost because all the messages are re-created from the frontend version of the string.
This change preserve the grd version of the strings that contains all the tags and use it when the messages are moving across different grdp files.

To test this:
In DeviceModeToolbar.js Line 351
Change
ls`Close DevTools`
To
'Close DevTools'

In WarningErrorCounter.js Line 163
Change
ls`Issues pertaining to ${issues} operation detected.`
To
ls`Close DevTools`

Run presubmit and see the tags are preserved.

Bug: 1071004
Change-Id: I5c724f0dc025dbfd06963373a8cb5fe7caf52803
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2275727
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
2020-07-01 00:30:49 +00:00
Tim van der Lippe c1e0cf3933 Update TypeScript to 4.0.0-beta
DISABLE_THIRD_PARTY_CHECK=Update TypeScript
R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: Ie636e205ee3b06a6189872088a1fa962beddd980
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2273178
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 16:24:33 +00:00
Tim van der Lippe d7344b14b3 Reland "Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end"""
This is a reland of d274209d78

Original change's description:
> Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
>
> This reverts commit 786fb877e8.
>
> Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
> no longer includes DevTools frontend in the Android build, fixing the issue
> where Android was including DevTools frontend twice.
>
> Original change's description:
> > Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> >
> > This reverts commit dbb8f31857.
> >
> > Reason for revert: suspected cause of build breakage downstream:
> > https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
> >
> > Original change's description:
> > > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> > >
> > > This is a reland of 9f16ccc6a1
> > >
> > > Original change's description:
> > > > Add rollup_entrypoint to rollup entrypoints in front_end
> > > >
> > > > To support lit-html in a release build, we have to run rollup
> > > > separately. Since lit-html source code is targeted to TypeScript,
> > > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > > file.
> > > >
> > > > This means that we can't use `build_release_applications.py` to rollup
> > > > this file (this is by design). Instead, we introduce a new
> > > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > > write a special Python file, as we can reuse `node.py` for this, which
> > > > is essentially a pipe-through with a pinned version of Node.
> > > >
> > > > While the rollup build works, for debug builds we are still missing
> > > > the `front_end/third_party/lit-html` files. We will address that
> > > > in a follow-up CL, once we introduce the first usage of lit-html
> > > > in the codebase.
> > > >
> > > > We are going to need to make more changes to Rollup later (most notably
> > > > the external files check), but since we aren't using this codepath
> > > > in `build_release_applications.py`, I will fix that in a separate CL.
> > > >
> > > > To reduce duplication in the Ninja build system, I also extract
> > > > a vars.gni file that has the relevant variables. These are currently
> > > > used in the rollup.gni and typescript.gni.
> > > >
> > > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > > the stdout. In Ninja, we should only print to stdout if there is
> > > > an error.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > > >
> > > > Bug: 1011811, 1061037
> > > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > >
> > > Bug: 1011811, 1061037, 1096473
> > > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
> >
> > Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1011811, 1061037, 1096473
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
>
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
>
> Bug: 1011811, 1061037, 1096473
> Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I908a5d923e0a874af372793a74a92e9873d5c07e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2273186
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 15:53:23 +00:00
Paul Lewis 64ba20b911 Adds watch mode for rebuillding changes
Since we are moving to running from built content in the gen/ directory,
we need to have a watcher to ensure convenience for anyone working on
the codebase. This CL introduces a watcher that calls autoninja whenever
a file is changed in the front_end folder. It also updates node.py so
that it outputs the contents of stdout and stderr when the --output flag
is set.

R=tvanderlippe@chromium.org

DISABLE_THIRD_PARTY_CHECK=Updating node alongside relevant changes

Bug: 1098694
Change-Id: I4ddb3d250d0fd80455ea24e95055de74b2be879c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2272559
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 15:32:58 +00:00
Tim van der Lippe b892cf3ca6 Revert "Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end"""
This reverts commit d274209d78.

Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8876155005776684608/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> 
> This reverts commit 786fb877e8.
> 
> Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
> no longer includes DevTools frontend in the Android build, fixing the issue
> where Android was including DevTools frontend twice.
> 
> Original change's description:
> > Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
> >
> > This reverts commit dbb8f31857.
> >
> > Reason for revert: suspected cause of build breakage downstream:
> > https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
> >
> > Original change's description:
> > > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> > >
> > > This is a reland of 9f16ccc6a1
> > >
> > > Original change's description:
> > > > Add rollup_entrypoint to rollup entrypoints in front_end
> > > >
> > > > To support lit-html in a release build, we have to run rollup
> > > > separately. Since lit-html source code is targeted to TypeScript,
> > > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > > file.
> > > >
> > > > This means that we can't use `build_release_applications.py` to rollup
> > > > this file (this is by design). Instead, we introduce a new
> > > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > > write a special Python file, as we can reuse `node.py` for this, which
> > > > is essentially a pipe-through with a pinned version of Node.
> > > >
> > > > While the rollup build works, for debug builds we are still missing
> > > > the `front_end/third_party/lit-html` files. We will address that
> > > > in a follow-up CL, once we introduce the first usage of lit-html
> > > > in the codebase.
> > > >
> > > > We are going to need to make more changes to Rollup later (most notably
> > > > the external files check), but since we aren't using this codepath
> > > > in `build_release_applications.py`, I will fix that in a separate CL.
> > > >
> > > > To reduce duplication in the Ninja build system, I also extract
> > > > a vars.gni file that has the relevant variables. These are currently
> > > > used in the rollup.gni and typescript.gni.
> > > >
> > > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > > the stdout. In Ninja, we should only print to stdout if there is
> > > > an error.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > > >
> > > > Bug: 1011811, 1061037
> > > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > >
> > > Bug: 1011811, 1061037, 1096473
> > > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
> >
> > Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1011811, 1061037, 1096473
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> 
> Bug: 1011811, 1061037, 1096473
> Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>

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

Change-Id: I9350b612f8a220fdd9c15eee6e63185e2dcc2850
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037, 1096473
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2273183
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-29 13:49:04 +00:00
Tim van der Lippe d274209d78 Reland "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
This reverts commit 786fb877e8.

Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
no longer includes DevTools frontend in the Android build, fixing the issue
where Android was including DevTools frontend twice.

Original change's description:
> Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
>
> This reverts commit dbb8f31857.
>
> Reason for revert: suspected cause of build breakage downstream:
> https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab
>
> Original change's description:
> > Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> >
> > This is a reland of 9f16ccc6a1
> >
> > Original change's description:
> > > Add rollup_entrypoint to rollup entrypoints in front_end
> > >
> > > To support lit-html in a release build, we have to run rollup
> > > separately. Since lit-html source code is targeted to TypeScript,
> > > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > > file.
> > >
> > > This means that we can't use `build_release_applications.py` to rollup
> > > this file (this is by design). Instead, we introduce a new
> > > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > > write a special Python file, as we can reuse `node.py` for this, which
> > > is essentially a pipe-through with a pinned version of Node.
> > >
> > > While the rollup build works, for debug builds we are still missing
> > > the `front_end/third_party/lit-html` files. We will address that
> > > in a follow-up CL, once we introduce the first usage of lit-html
> > > in the codebase.
> > >
> > > We are going to need to make more changes to Rollup later (most notably
> > > the external files check), but since we aren't using this codepath
> > > in `build_release_applications.py`, I will fix that in a separate CL.
> > >
> > > To reduce duplication in the Ninja build system, I also extract
> > > a vars.gni file that has the relevant variables. These are currently
> > > used in the rollup.gni and typescript.gni.
> > >
> > > Lastly, I had to fix node.py to make sure it wouldn't always print
> > > the stdout. In Ninja, we should only print to stdout if there is
> > > an error.
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> > >
> > > Bug: 1011811, 1061037
> > > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> >
> > Bug: 1011811, 1061037, 1096473
> > Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811, 1061037, 1096473
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> Commit-Queue: Andrey Kosyakov <caseq@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I9b0fb13bfff83ea91599e69cb024b8ddf51b3c79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2260353
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2020-06-29 12:43:32 +00:00
Tim van der Lippe fe75007069 Run e2e-tests on build output
The e2e-tests now use the build output in resources/inspector in
the out directory. This allows us to introduce TypeScript-authored
files in the source directory `front_end`, which will get compiled
into resourc/inspector.

After to making a change to a e2e-test or the front_end, you need
to rebuild Devtools, after which you can run `npm run e2etest` as
normal.

Since we now use the build output, this also means that you can
run the e2e-tests on the release build. In other words, if you
build DevTools with build optimizations (such as Rollup), the
e2e-tests will now use the output (and thus provide test coverage).

DISABLE_THIRD_PARTY_CHECK=Node fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Fixed: 1088463
Change-Id: I02ec3c2476bc3647158fede9e1d347963b3a720a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224809
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-06-29 11:35:23 +00:00
Ng Zhi An 1f7986a53e Use acorn-numeric-separator
Use `npm run build` to generate the mjs files.
Create a acorn-numeric-separator_types.mjs for closure to typecheck.
Create acorn-numeric-separator.mjs.d.ts for TS compiler.
Update acorn_types.mjs to allow Parser to take varargs.

Bug: chromium:1086817
Change-Id: I9f040ddaf5748f3d7437a075c3322335d8e076ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2261447
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-26 16:31:38 +00:00
Paul Irish 6580fb3e51 stylelint: exit gracefully if all affected files are ignored
Bug: chromium:1083142
Change-Id: I182e4555088b69ed15826d4d59882a09fcc3a58c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2268387
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Paul Irish <paulirish@chromium.org>
2020-06-26 10:11:55 +00:00
Tim van der Lippe 7989857282 Add @types/estree to dependencies
These types will be used in the formatter_worker/ which references
types like `ESTree.Node`

DISABLE_THIRD_PARTY_CHECK=New npm dependency
R=jacktfranklin@chromium.org

Bug: 1098730
Change-Id: I0d8868c5f528a8eb11431741b7c98f15dd3bc2ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2264119
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>
2020-06-24 16:03:29 +00:00
Mathias Bynens 779b5ea094 Roll Puppeteer v4.0.0
DISABLE_THIRD_PARTY_CHECK=updating node_modules deps

Change-Id: I37d4670cf18e26e8caa8a5b1ca19c8f187244bac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2259851
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-23 12:40:26 +00:00
Mathias Bynens 8604a98e45 Add stylelint-config-standard dependency
DISABLE_THIRD_PARTY_CHECK=updating node_modules deps

Bug: chromium:1083142
Change-Id: Ic4a2a914da2f739c304c1607aa17002548980e6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2259834
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-23 09:29:46 +00:00
Andrey Kosyakov 786fb877e8 Revert "Reland "Add rollup_entrypoint to rollup entrypoints in front_end""
This reverts commit dbb8f31857.

Reason for revert: suspected cause of build breakage downstream:
https://ci.chromium.org/p/chromium/builders/ci/Android%20arm64%20Builder%20%28dbg%29/42557?blamelist=1#blamelist-tab

Original change's description:
> Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
> 
> This is a reland of 9f16ccc6a1
> 
> Original change's description:
> > Add rollup_entrypoint to rollup entrypoints in front_end
> >
> > To support lit-html in a release build, we have to run rollup
> > separately. Since lit-html source code is targeted to TypeScript,
> > the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> > file.
> >
> > This means that we can't use `build_release_applications.py` to rollup
> > this file (this is by design). Instead, we introduce a new
> > `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> > write a special Python file, as we can reuse `node.py` for this, which
> > is essentially a pipe-through with a pinned version of Node.
> >
> > While the rollup build works, for debug builds we are still missing
> > the `front_end/third_party/lit-html` files. We will address that
> > in a follow-up CL, once we introduce the first usage of lit-html
> > in the codebase.
> >
> > We are going to need to make more changes to Rollup later (most notably
> > the external files check), but since we aren't using this codepath
> > in `build_release_applications.py`, I will fix that in a separate CL.
> >
> > To reduce duplication in the Ninja build system, I also extract
> > a vars.gni file that has the relevant variables. These are currently
> > used in the rollup.gni and typescript.gni.
> >
> > Lastly, I had to fix node.py to make sure it wouldn't always print
> > the stdout. In Ninja, we should only print to stdout if there is
> > an error.
> >
> > DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> > R=jacktfranklin@chromium.org,aerotwist@chromium.org
> >
> > Bug: 1011811, 1061037
> > Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> 
> Bug: 1011811, 1061037, 1096473
> Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ia6fd6111181500ad44c7757321d141f320b1edf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037, 1096473
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2257954
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
2020-06-22 17:49:05 +00:00
Ng Zhi An 8d54f1a43a Use acorn-logical-assignment
Bug: chromium:1080569
Change-Id: Id65b11e9df68f1e04ec2b84b18b8684db3452f37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2235965
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-22 16:38:03 +00:00
Tim van der Lippe dbb8f31857 Reland "Add rollup_entrypoint to rollup entrypoints in front_end"
This is a reland of 9f16ccc6a1

Original change's description:
> Add rollup_entrypoint to rollup entrypoints in front_end
>
> To support lit-html in a release build, we have to run rollup
> separately. Since lit-html source code is targeted to TypeScript,
> the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> file.
>
> This means that we can't use `build_release_applications.py` to rollup
> this file (this is by design). Instead, we introduce a new
> `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> write a special Python file, as we can reuse `node.py` for this, which
> is essentially a pipe-through with a pinned version of Node.
>
> While the rollup build works, for debug builds we are still missing
> the `front_end/third_party/lit-html` files. We will address that
> in a follow-up CL, once we introduce the first usage of lit-html
> in the codebase.
>
> We are going to need to make more changes to Rollup later (most notably
> the external files check), but since we aren't using this codepath
> in `build_release_applications.py`, I will fix that in a separate CL.
>
> To reduce duplication in the Ninja build system, I also extract
> a vars.gni file that has the relevant variables. These are currently
> used in the rollup.gni and typescript.gni.
>
> Lastly, I had to fix node.py to make sure it wouldn't always print
> the stdout. In Ninja, we should only print to stdout if there is
> an error.
>
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> R=jacktfranklin@chromium.org,aerotwist@chromium.org
>
> Bug: 1011811, 1061037
> Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Ninja fixes

Bug: 1011811, 1061037, 1096473
Change-Id: I5695c445f8456b6447c836dead89bdd4cf98b0fa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247646
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-22 13:04:33 +00:00
Tim van der Lippe 1dccfa6085 Do not run coverage by default for Karma
This speeds up the time for the Karma unittests to run from 26 seconds
to 4 seconds, using the default arguments. You can still obtain
the coverage report by running

```
npm run auto-unittest -- --coverage
npm run unittest -- --coverage
```

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

Fixed: 1085426
Change-Id: I0c6be53a24223f9c9d3492143f0802ba9a15e60e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2251958
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-22 11:01:52 +00:00
Patrick Brosset e65aaac861 Enable the no-return-assign ESLint rule
This rule disallows assigning a value in a return statement.
It also works in one-liner arrow functions.

For instance, a => a = 2 will trigger a warning.
This is to avoid cases where you actually meant to compare a to 2, not
assign the value 2 (maybe you wanted to return a boolean in a filter
callback).
These sorts of issues can easily pass review and cause weird problems
that are hard to track down later.

The rule is enabled in this CL, and all warnings are fixed with this CL.

More info about the rule: https://eslint.org/docs/rules/no-return-assign

Bug: 1093379
Change-Id: I38b98ea59ecaedc83a7f69073b17980808f9a3bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2242761
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-06-22 08:34:42 +00:00
Mathias Bynens ac76229e8a Force-replace Windows-style path separators for stylelint
stylelint requires POSIX-formatted paths/globs, even on Windows. This
patch ensures we pass such paths in the case where only specific files
are being linted (i.e. `PRESUBMIT.py` calls `run_lint_check_css.py`
with a list of potentially Windows-formatted file paths as arguments.

Bug: chromium:1083142
Change-Id: I1eea6bf146decd52bb978388d4e3e98f48ec91b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2252007
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-19 08:40:21 +00:00
Mathias Bynens 0ec56611a7 Fix stylelint path resolution on Windows
On Windows, if your checkout is at:

    C:\devtools\devtools-frontend

Then the stylelint CLI lives here:

    C:\devtools\devtools-frontend\node_modules\stylelint\bin\stylelint.js

Prior to this patch, the lint CSS script was instead trying to use:

    C:\node_modules\stylelint\bin\stylelint.js

That is, it went two levels too far up the directory tree. This only
happened on Windows.

This patch avoids the problem altogether by forcing the root directory
to be the current working directory and passing a root-relative glob
instead.

As a drive-by, this patch cleans up the `_getFilesToLint` helper in
`PRESUBMIT.py`.

Bug: chromium:1083142
Change-Id: Ida7d19e4c1cb8954346a3103ce95748f0bc38f00
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2252005
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-19 07:33:31 +00:00
Tim van der Lippe 72e8dbac26 Do not minify when copying debugged sources
Not sure why we did this in the first place, but it is definitely
no longer necessary now.

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

Change-Id: Ib02657f7f910d3edcbd0dde60f2873d18d7a9d57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2252163
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-06-18 18:00:47 +00:00
Mathias Bynens 8514078e45 Avoid pathlib dependency in CSS lint script
Although pathlib ships with Python 3, it’s not part of Python 2.
This patch re-implements the path logic using built-in APIs only,
to ensure the script works across multiple Python versions
regardless of which packages are installed locally.

Bug: chromium:1083142
Change-Id: Id96eadab288bec873f8ce2855ca0c2aed9417f0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2249936
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-18 12:12:06 +00:00
Mathias Bynens 1b2c5e463e Enable stylelint on presubmit
Bug: chromium:1083142
Change-Id: I74136f2ba5b74d4385760e157e2495d706cb5c35
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2248184
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-18 10:41:46 +00:00
Tim van der Lippe 8dcbdb8aeb Remove npm run start script
It is superseded by the runtime flag `--custom-devtools-frontend`,
as documented in our README.

We can no longer keep this script around, as it blocks the inclusion
of TypeScript-authored files in the source tree.

R=yangguo@chromium.org,Rob.Paveza@microsoft.com

Design-Doc: https://docs.google.com/document/d/1COgCBWWuTh2o-Zbp6h_z0h0LtlJaimaEDsION4RZPxc/edit
Bug: 1061037, 1011811
Change-Id: Id7a347f28acf7a3a065c5c3dea4e74443d4ac7ed
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2247653
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-06-17 11:33:07 +00:00
Tim van der Lippe 1009500fe4 Reland "Move rollup configuration to front_end/rollup.config.js"
This reverts commit 696a03e075.

Reason for revert: Chromium build performance issues should be mitigated.

Original change's description:
> Revert "Move rollup configuration to front_end/rollup.config.js"
>
> This reverts commit 11c3e48f98.
>
> Reason for revert: Has a negative performance impact for Chromium builds
>
> Original change's description:
> > Move rollup configuration to front_end/rollup.config.js
> >
> > This makes it easier to change the rollup configuration and allows
> > us to introduce the terser minification plugin.
> >
> > R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> >
> > Bug: 1084578
> > Change-Id: Ie9c3447913a9d6ca59905267472a8bad328642b2
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208134
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 1084578
> Change-Id: If359d1398796330e8569a1ecf0af9d94ad08abae
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218065
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

# Windows presubmit is broken: crbug.com/1095581
No-Presubmit: true
Bug: 1084578, 1095581
Change-Id: I4a96fc91bc5c6e1394535dd2c5e413ecadfdcf3d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2246509
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-16 11:45:18 +00:00
Alex Rudenko 0697f50b6b Filter out internal CSS properties
Internal CSS properties should not be visible anywhere so this CL
removes them from the generated files to reduce the file size.

Fixed: 1092826
Change-Id: I0b4d4694a40bef8444b06eb0578185f60651633a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2245143
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-06-15 14:29:42 +00:00
Tim van der Lippe 931cc8450e Revert "Add rollup_entrypoint to rollup entrypoints in front_end"
This reverts commit 9f16ccc6a1.

Reason for revert: Fails in Chromium roll: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8877691983703106912/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Add rollup_entrypoint to rollup entrypoints in front_end
> 
> To support lit-html in a release build, we have to run rollup
> separately. Since lit-html source code is targeted to TypeScript,
> the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> file.
> 
> This means that we can't use `build_release_applications.py` to rollup
> this file (this is by design). Instead, we introduce a new
> `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> write a special Python file, as we can reuse `node.py` for this, which
> is essentially a pipe-through with a pinned version of Node.
> 
> While the rollup build works, for debug builds we are still missing
> the `front_end/third_party/lit-html` files. We will address that
> in a follow-up CL, once we introduce the first usage of lit-html
> in the codebase.
> 
> We are going to need to make more changes to Rollup later (most notably
> the external files check), but since we aren't using this codepath
> in `build_release_applications.py`, I will fix that in a separate CL.
> 
> To reduce duplication in the Ninja build system, I also extract
> a vars.gni file that has the relevant variables. These are currently
> used in the rollup.gni and typescript.gni.
> 
> Lastly, I had to fix node.py to make sure it wouldn't always print
> the stdout. In Ninja, we should only print to stdout if there is
> an error.
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> 
> Bug: 1011811, 1061037
> Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ida2a1e30d601e87f64a7c35bbc527c700d9cbe70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2243175
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 14:48:09 +00:00
Tim van der Lippe 9f16ccc6a1 Add rollup_entrypoint to rollup entrypoints in front_end
To support lit-html in a release build, we have to run rollup
separately. Since lit-html source code is targeted to TypeScript,
the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
file.

This means that we can't use `build_release_applications.py` to rollup
this file (this is by design). Instead, we introduce a new
`rollup_entrypoint` Ninja target that calls Rollup. We don't have to
write a special Python file, as we can reuse `node.py` for this, which
is essentially a pipe-through with a pinned version of Node.

While the rollup build works, for debug builds we are still missing
the `front_end/third_party/lit-html` files. We will address that
in a follow-up CL, once we introduce the first usage of lit-html
in the codebase.

We are going to need to make more changes to Rollup later (most notably
the external files check), but since we aren't using this codepath
in `build_release_applications.py`, I will fix that in a separate CL.

To reduce duplication in the Ninja build system, I also extract
a vars.gni file that has the relevant variables. These are currently
used in the rollup.gni and typescript.gni.

Lastly, I had to fix node.py to make sure it wouldn't always print
the stdout. In Ninja, we should only print to stdout if there is
an error.

DISABLE_THIRD_PARTY_CHECK=Ninja fixes
R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1011811, 1061037
Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 13:09:06 +00:00
Yang Guo 96aaa36f93 [build] check return code after rollup
R=tvanderlipp@chromium.org

Change-Id: Iea9561c4aab141075e10c94c1ea04dac72a63131
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2241681
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>
2020-06-12 10:24:06 +00:00
Christy Chen 3fa95bc487 [Loc] Update localization documentation
Add some FAQs for Loc V2.

Bug: 941561
Change-Id: I23ce46bc01d567f20764c7de8ccd5d7583e017b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238608
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-06-12 00:16:15 +00:00
Mathias Bynens 79e2cf0633 Add stylelint dependency
This also adds CC-BY-4.0 to the list of accepted licenses.

DISABLE_THIRD_PARTY_CHECK=update dependencies

Bug: chromium:1083142
Change-Id: I8612de2fba52dae32eeb71af79d5aacfde52142b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220097
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-11 06:20:04 +00:00
Alex Rudenko d13aac9a56 Ignore internal css keywords
Adds filtering of internal CSS keywords to generate_supported_css.py
An internal keyword was added on the blink side[1] which breaks
CSS autocompletion tests.

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

Bug: 1092826
Change-Id: I6aede74affcddd88c1efabd94e2441a9b6ebd8fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2236403
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-06-09 11:04:09 +00:00
Jack Franklin 1557a1c167 Components dev server
This introduces the components server that we will use to view
components locally.

Design doc:
https://docs.google.com/document/d/1P6qtACf4aryfT9OSHxNFI3okMKt9oUrtzOKCws5bOec/edit?pli=1

Change-Id: I6cd7588f045c3cd46e57f1f44441ffa95f0b70bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199081
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-08 14:53:56 +00:00
Tim van der Lippe 78f57416d0 Remove debug_devtools flag from devtools-frontend
This removes the build support for debug_devtools, which is replaced
by the runtime flag `--custom-devtools-frontend`.

This depends on https://chromium-review.googlesource.com/c/chromium/src/+/2224216
to land in Chromium first.

DISABLE_THIRD_PARTY_CHECK=Cleanup of build scripts
R=yangguo@chromium.org

Bug: 1087379
Change-Id: I4494e111cab67e752d6dfad83cc9edb90df73a3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224799
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-06-08 11:27:55 +00:00
Tim van der Lippe 0a2971a084 Remove _hasErrorData from AgentPrototype
This field is unused and always false. This means we can remove more code
from InspectorBackend.js and InspectorBackendCommands.js.

R=sigurds@chromium.org

Change-Id: I52155f202765aa66a7dd3e79adf99eb1be7814cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230524
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-05 12:37:19 +00:00
Tim van der Lippe dfe3e28145 Revert "Typecheck sdk/SourceMap.js with TypeScript"
This reverts commit c9118a78a3.

Reason for revert: Layout test update encovered an actual functional change: https://test-results.appspot.com/data/layout_results/linux-rel/401616/blink_web_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html

Original change's description:
> Typecheck sdk/SourceMap.js with TypeScript
> 
> R=​sigurds@chromium.org,rreverser@google.com
> 
> Bug: chromium:1011811, chromium:1079233
> Change-Id: Ied723f6d952cfe8f40b885f63d36eef6b614ed72
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215850
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Ingvar Stepanyan <rreverser@google.com>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>

TBR=sigurds@chromium.org,tvanderlippe@chromium.org,rreverser@google.com

Change-Id: I3956a020caf198b9f69459f650248837799d72a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1011811, chromium:1079233
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230504
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-04 10:01:52 +00:00
Alex Rudenko 4f8e4f9344 Reuse blendColors util
This CL extracts blendColors into a new utils file (more lightweight
function utils compared to Color.js) and reuses it in the overlay code.
Also, it adds an exception to eslint module import rules for the
inspector overlay folder because inspector overlay benefits from
granular imports instead of complete namespace imports.

Bug: 1078267
Change-Id: I01ec8f295da8bfac0b57b9dd2661ca9f798de869
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2228514
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-06-04 06:23:51 +00:00
Brian Cui 1cc53e02a8 Add --chrome-binary argument to unittest script
This CL adds an optional --chrome-binary argument to the unittest.py
script to use a specific Chrome binary to run unit tests against.
When no argument is specified, the script defaults to the downloaded
Chrome binary from `gclient sync` (same behavior as before).

We'd like to have the option of running unit tests on a Microsoft Edge
executable instead of the default downloaded Chrome executable.

Change-Id: Ice72f129086bcc1da56efa118280532cdbb25fd3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2202628
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Brian Cui <brcui@microsoft.com>
2020-06-03 17:32:55 +00:00
Tim van der Lippe c9118a78a3 Typecheck sdk/SourceMap.js with TypeScript
R=sigurds@chromium.org,rreverser@google.com

Bug: chromium:1011811, chromium:1079233
Change-Id: Ied723f6d952cfe8f40b885f63d36eef6b614ed72
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215850
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-06-03 12:26:34 +00:00
Tim van der Lippe 26bb5ad91b Remove logic for downloading a content_shell from npm_test.js
This logic was used to download a content_shell from a remote location
when trying to run a test. However, we should only be using local
versions when running tests.

R=yangguo@chromium.org

Bug: 1087379
Change-Id: I134f007e4fe29ce59e23bf03b176631f19c9555c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224798
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-02 14:16:00 +00:00
Tim van der Lippe 7a78ddbe52 Remove scripts/test/run_e2e.py
It is replaced by `scripts/test/run_test_suite.py --test-suite=e2e`.

Requires https://chromium-review.googlesource.com/c/chromium/tools/build/+/2224815/
to land first.

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

Bug: 1088463
Change-Id: I665b03f8f6f9fdb843072fc18aa7322fe17e41e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2226556
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-06-02 11:59:20 +00:00