[trace engine] Add Lighthouse's Lantern library [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Connor Clark (Gerrit)

unread,
Jun 16, 2024, 9:31:26 PM (13 days ago) Jun 16
to Jack Franklin, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Jack Franklin and Paul Irish

Connor Clark added 1 comment

File front_end/models/trace/lantern/types/lantern.ts
Line 9, Patchset 2 (Latest): */
Connor Clark . unresolved

Someone either knowledgable about software licenses, or at least with an opinion, please weigh in on if I should simply delete these License comments from the original source files.

A potential option might be to put the license in a LICENSE file in the `lantern` folder.

I think outright deleting it is not correct, because Chromium != Google, right? So while the CLA we have LH contributors sign assigns ownership to Google, does that mean a Chromium tree can treat it like it owns it? shrug.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Jack Franklin
  • Paul Irish
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Gerrit-Change-Number: 5635855
Gerrit-PatchSet: 2
Gerrit-Owner: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
Gerrit-Attention: Adam Raine <asr...@chromium.org>
Gerrit-Attention: Paul Irish <paul...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Jun 2024 01:31:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Connor Clark (Gerrit)

unread,
Jun 16, 2024, 9:34:24 PM (13 days ago) Jun 16
to Devtools-frontend LUCI CQ, Jack Franklin, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Jack Franklin and Paul Irish

Connor Clark added 1 comment

File front_end/models/trace/lantern/types/lantern.ts
Connor Clark . unresolved

Someone either knowledgable about software licenses, or at least with an opinion, please weigh in on if I should simply delete these License comments from the original source files.

A potential option might be to put the license in a LICENSE file in the `lantern` folder.

I think outright deleting it is not correct, because Chromium != Google, right? So while the CLA we have LH contributors sign assigns ownership to Google, does that mean a Chromium tree can treat it like it owns it? shrug.

Connor Clark

btw "treat it like it owns it" in this case mean, ignoring the requirements of the license to include the license text in derivative works. If one owns the rights to the code, that requirement doesn't apply.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Jack Franklin
  • Paul Irish
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Gerrit-Change-Number: 5635855
Gerrit-PatchSet: 2
Gerrit-Owner: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
Gerrit-Attention: Adam Raine <asr...@chromium.org>
Gerrit-Attention: Paul Irish <paul...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Jun 2024 01:34:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
unsatisfied_requirement
open
diffy

Connor Clark (Gerrit)

unread,
Jun 17, 2024, 6:10:08 PM (12 days ago) Jun 17
to Andres Olivares, Devtools-frontend LUCI CQ, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Andres Olivares and Paul Irish

Connor Clark added 1 comment

File front_end/models/trace/lantern/metrics/Interactive.test.ts
Line 20, Patchset 3 (Latest): // TODO: why isn't "assertMatchesJSONSnapshot" working? get 404 for snapshots.js
Connor Clark . unresolved

Can anyone help me figure out why I can't get the snapshots module to work in my tests?

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Andres Olivares
  • Paul Irish
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Gerrit-Change-Number: 5635855
Gerrit-PatchSet: 3
Gerrit-Owner: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Andres Olivares <and...@chromium.org>
Gerrit-Attention: Adam Raine <asr...@chromium.org>
Gerrit-Attention: Paul Irish <paul...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Jun 2024 22:10:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Connor Clark (Gerrit)

unread,
Jun 17, 2024, 8:05:10 PM (12 days ago) Jun 17
to Andres Olivares, Devtools-frontend LUCI CQ, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Andres Olivares and Paul Irish

Connor Clark added 1 comment

File front_end/models/trace/lantern/metrics/Interactive.test.ts
Line 20, Patchset 3: // TODO: why isn't "assertMatchesJSONSnapshot" working? get 404 for snapshots.js
Connor Clark . resolved

Can anyone help me figure out why I can't get the snapshots module to work in my tests?

Connor Clark

paul helped. we learned unittests can't use this module, only node tests.

I replaced with deep strict asserts.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Andres Olivares
  • Paul Irish
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Gerrit-Change-Number: 5635855
Gerrit-PatchSet: 4
Gerrit-Owner: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Andres Olivares <and...@chromium.org>
Gerrit-Attention: Adam Raine <asr...@chromium.org>
Gerrit-Attention: Paul Irish <paul...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Jun 2024 00:05:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
unsatisfied_requirement
open
diffy

Jack Franklin (Gerrit)

unread,
Jun 18, 2024, 5:01:41 AM (12 days ago) Jun 18
to Connor Clark, Yang Guo, Andres Olivares, Devtools-frontend LUCI CQ, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Andres Olivares, Connor Clark, Paul Irish and Yang Guo

Jack Franklin added 1 comment

File front_end/models/trace/lantern/types/lantern.ts
Connor Clark . unresolved

Someone either knowledgable about software licenses, or at least with an opinion, please weigh in on if I should simply delete these License comments from the original source files.

A potential option might be to put the license in a LICENSE file in the `lantern` folder.

I think outright deleting it is not correct, because Chromium != Google, right? So while the CLA we have LH contributors sign assigns ownership to Google, does that mean a Chromium tree can treat it like it owns it? shrug.

Connor Clark

btw "treat it like it owns it" in this case mean, ignoring the requirements of the license to include the license text in derivative works. If one owns the rights to the code, that requirement doesn't apply.

Jack Franklin

@yan...@chromium.org might be able to aid here or know the best person to talk to

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Andres Olivares
  • Connor Clark
  • Paul Irish
  • Yang Guo
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
Gerrit-Change-Number: 5635855
Gerrit-PatchSet: 6
Gerrit-Owner: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
Gerrit-CC: Yang Guo <yan...@chromium.org>
Gerrit-Attention: Andres Olivares <and...@chromium.org>
Gerrit-Attention: Adam Raine <asr...@chromium.org>
Gerrit-Attention: Yang Guo <yan...@chromium.org>
Gerrit-Attention: Connor Clark <cja...@chromium.org>
Gerrit-Attention: Paul Irish <paul...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Jun 2024 09:01:35 +0000
unsatisfied_requirement
open
diffy

Jack Franklin (Gerrit)

unread,
Jun 18, 2024, 5:02:46 AM (12 days ago) Jun 18
to Connor Clark, Yang Guo, Andres Olivares, Devtools-frontend LUCI CQ, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Andres Olivares, Connor Clark, Paul Irish and Yang Guo

Jack Franklin added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Jack Franklin . resolved

this is exciting! I am not going to review the code in detail but it's awesome to see this coming in 😊

Gerrit-Comment-Date: Tue, 18 Jun 2024 09:02:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Andres Olivares (Gerrit)

unread,
Jun 18, 2024, 5:43:06 AM (12 days ago) Jun 18
to Connor Clark, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, Paul Irish, Adam Raine, devtools-rev...@chromium.org
Attention needed from Adam Raine, Connor Clark, Paul Irish and Yang Guo

Andres Olivares voted and added 5 comments

Votes added by Andres Olivares

Code-Review+1

5 comments

Patchset-level comments
Andres Olivares . resolved

cool to see this happening!
LGTM % license headers and tracking pending tasks for integrating with repo ts and lint config

File front_end/models/trace/lantern/.eslintrc.js
Line 13, Patchset 6 (Latest): // TODO: off due to Lantern needing more refactoring.
Andres Olivares . unresolved

maybe it's worth filing a bug for this to ensure we don't forget to resolve this (or tying it to an existing bug)

File front_end/models/trace/lantern/BUILD.gn
Line 38, Patchset 6 (Latest): "../../../core/common:bundle",
"../../../core/platform:bundle",
"../../../core/root:bundle",
"../../../core/sdk:bundle",
Andres Olivares . unresolved

do we expect to use these deps? If we do so it might cause issues when rolling to the standalone library, but I think we don't need them.

File front_end/models/trace/lantern/metrics/FirstContentfulPaint.test.ts
Line 11, Patchset 6 (Latest):// @ts-nocheck
Andres Olivares . unresolved

ditto: tracking bug (and other ts-nochecks)

File front_end/models/trace/lantern/tsconfig.json
Line 6, Patchset 6 (Latest): // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
Andres Olivares . unresolved

do we want to eventually enable these or could we remove them completely (or something in between)?

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Raine
  • Connor Clark
  • Paul Irish
  • Yang Guo
    Submit Requirements:
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
    Gerrit-Change-Number: 5635855
    Gerrit-PatchSet: 6
    Gerrit-Owner: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
    Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
    Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
    Gerrit-CC: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Adam Raine <asr...@chromium.org>
    Gerrit-Attention: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Connor Clark <cja...@chromium.org>
    Gerrit-Attention: Paul Irish <paul...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Jun 2024 09:43:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Paul Irish (Gerrit)

    unread,
    Jun 18, 2024, 9:05:57 AM (12 days ago) Jun 18
    to Connor Clark, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, Adam Raine, devtools-rev...@chromium.org
    Attention needed from Adam Raine, Andres Olivares, Connor Clark, Jack Franklin and Yang Guo

    Paul Irish added 3 comments

    File front_end/models/trace/lantern/BUILD.gn
    Line 38, Patchset 6 (Latest): "../../../core/common:bundle",
    "../../../core/platform:bundle",
    "../../../core/root:bundle",
    "../../../core/sdk:bundle",
    Andres Olivares . unresolved

    do we expect to use these deps? If we do so it might cause issues when rolling to the standalone library, but I think we don't need them.

    Paul Irish

    If we do so it might cause issues when rolling to the standalone library,

    I checked this and it doesn't. (But... I don't know why. (Nor do I know why they're here ;))

    File front_end/models/trace/lantern/types/lantern.ts
    Connor Clark . unresolved

    Someone either knowledgable about software licenses, or at least with an opinion, please weigh in on if I should simply delete these License comments from the original source files.

    A potential option might be to put the license in a LICENSE file in the `lantern` folder.

    I think outright deleting it is not correct, because Chromium != Google, right? So while the CLA we have LH contributors sign assigns ownership to Google, does that mean a Chromium tree can treat it like it owns it? shrug.

    Connor Clark

    btw "treat it like it owns it" in this case mean, ignoring the requirements of the license to include the license text in derivative works. If one owns the rights to the code, that requirement doesn't apply.

    Jack Franklin

    @yan...@chromium.org might be able to aid here or know the best person to talk to

    Paul Irish

    gemini, at least, says this is fine, but has guidance around attribution: https://g.co/gemini/share/bfdb4e58552c

    File front_end/models/trace/trace.ts
    Line 24, Patchset 6 (Latest): Lantern,
    Paul Irish . unresolved

    Given the new home do we want to rename this?

    I'm happy with `Lantern`, but... I'd also be happy with `Simulator`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Raine
    • Andres Olivares
    • Connor Clark
    • Jack Franklin
    • Yang Guo
    Submit Requirements:
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
    Gerrit-Change-Number: 5635855
    Gerrit-PatchSet: 6
    Gerrit-Owner: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
    Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
    Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
    Gerrit-CC: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Attention: Andres Olivares <and...@chromium.org>
    Gerrit-Attention: Adam Raine <asr...@chromium.org>
    Gerrit-Attention: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Connor Clark <cja...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Jun 2024 13:05:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
    Comment-In-Reply-To: Andres Olivares <and...@chromium.org>
    Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
    satisfied_requirement
    open
    diffy

    Adam Raine (Gerrit)

    unread,
    Jun 18, 2024, 2:54:21 PM (12 days ago) Jun 18
    to Connor Clark, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, Paul Irish, devtools-rev...@chromium.org
    Attention needed from Andres Olivares, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

    Adam Raine added 2 comments

    File front_end/models/trace/LanternComputationData.ts
    Line 5, Patchset 6 (Latest):/**
    Adam Raine . unresolved

    Why is this file outside the `trace/lantern` folder?

    File front_end/models/trace/trace.ts
    Paul Irish . unresolved

    Given the new home do we want to rename this?

    I'm happy with `Lantern`, but... I'd also be happy with `Simulator`

    Adam Raine

    I think renaming would be more work than normal since we need to sync between this and the LH repo. I think we should just keep it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andres Olivares
    • Connor Clark
    • Jack Franklin
    • Paul Irish
    • Yang Guo
    Submit Requirements:
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
    Gerrit-Change-Number: 5635855
    Gerrit-PatchSet: 6
    Gerrit-Owner: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
    Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
    Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
    Gerrit-CC: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Attention: Andres Olivares <and...@chromium.org>
    Gerrit-Attention: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Paul Irish <paul...@chromium.org>
    Gerrit-Attention: Connor Clark <cja...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Jun 2024 18:54:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Paul Irish <paul...@chromium.org>
    satisfied_requirement
    open
    diffy

    Paul Irish (Gerrit)

    unread,
    Jun 18, 2024, 7:07:40 PM (11 days ago) Jun 18
    to Connor Clark, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, Adam Raine, devtools-rev...@chromium.org
    Attention needed from Adam Raine, Andres Olivares, Connor Clark, Jack Franklin and Yang Guo

    Paul Irish voted and added 1 comment

    Votes added by Paul Irish

    Code-Review+1

    1 comment

    File front_end/models/trace/trace.ts
    Paul Irish . resolved

    Given the new home do we want to rename this?

    I'm happy with `Lantern`, but... I'd also be happy with `Simulator`

    Adam Raine

    I think renaming would be more work than normal since we need to sync between this and the LH repo. I think we should just keep it.

    Paul Irish

    wfm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Raine
    • Andres Olivares
    • Connor Clark
    • Jack Franklin
    • Yang Guo
    Submit Requirements:
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
    Gerrit-Change-Number: 5635855
    Gerrit-PatchSet: 6
    Gerrit-Owner: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
    Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
    Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
    Gerrit-CC: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Attention: Adam Raine <asr...@chromium.org>
    Gerrit-Attention: Andres Olivares <and...@chromium.org>
    Gerrit-Attention: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Connor Clark <cja...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Jun 2024 23:07:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Adam Raine <asr...@chromium.org>
    Comment-In-Reply-To: Paul Irish <paul...@chromium.org>
    satisfied_requirement
    open
    diffy

    Connor Clark (Gerrit)

    unread,
    Jun 20, 2024, 4:09:53 PM (10 days ago) Jun 20
    to Paul Irish, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, Adam Raine, devtools-rev...@chromium.org
    Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

    Connor Clark added 5 comments

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Connor Clark . resolved

    Patchset 7 (labeled lint), these are my granular local commit messages:

    lint
    add bug ref to todos
    handle naming-convention lint rule
    address no-unused-vars lint rule
    remove some ts-nochecks
    remove unneeded tsconfig.json
    re-enable no-explicit-any lint rule
    remove unused deps

    File front_end/models/trace/LanternComputationData.ts
    Adam Raine . unresolved

    Why is this file outside the `trace/lantern` folder?

    Connor Clark

    Circular dependencies. I forget the details.

    File front_end/models/trace/lantern/.eslintrc.js
    Line 13, Patchset 6: // TODO: off due to Lantern needing more refactoring.
    Andres Olivares . resolved

    maybe it's worth filing a bug for this to ensure we don't forget to resolve this (or tying it to an existing bug)

    Connor Clark

    I addressed most of them here and added https://g-issues.chromium.org/issues/348449529 for the remaining.

    File front_end/models/trace/lantern/BUILD.gn
    Line 38, Patchset 6: "../../../core/common:bundle",

    "../../../core/platform:bundle",
    "../../../core/root:bundle",
    "../../../core/sdk:bundle",
    Andres Olivares . resolved

    do we expect to use these deps? If we do so it might cause issues when rolling to the standalone library, but I think we don't need them.

    Paul Irish

    If we do so it might cause issues when rolling to the standalone library,

    I checked this and it doesn't. (But... I don't know why. (Nor do I know why they're here ;))

    Connor Clark

    Removed - weren't needed as you said. Not sure why I placed them here.

    File front_end/models/trace/lantern/tsconfig.json
    Line 6, Patchset 6: // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
    Andres Olivares . resolved

    do we want to eventually enable these or could we remove them completely (or something in between)?

    Connor Clark

    this file wasn't doing anything and should not have been included, removed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Raine
    • Andres Olivares
    • Jack Franklin
    • Paul Irish
    • Yang Guo
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
    Gerrit-Change-Number: 5635855
    Gerrit-PatchSet: 7
    Gerrit-Owner: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
    Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
    Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
    Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
    Gerrit-CC: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Attention: Andres Olivares <and...@chromium.org>
    Gerrit-Attention: Adam Raine <asr...@chromium.org>
    Gerrit-Attention: Yang Guo <yan...@chromium.org>
    Gerrit-Attention: Paul Irish <paul...@chromium.org>
    Gerrit-Comment-Date: Thu, 20 Jun 2024 20:09:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Adam Raine <asr...@chromium.org>
    Comment-In-Reply-To: Andres Olivares <and...@chromium.org>
    Comment-In-Reply-To: Paul Irish <paul...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Adam Raine (Gerrit)

    unread,
    Jun 20, 2024, 5:10:08 PM (10 days ago) Jun 20
    to Connor Clark, Paul Irish, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Andres Olivares, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

    Adam Raine voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andres Olivares
    • Connor Clark
    • Jack Franklin
    • Paul Irish
    • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 8
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Thu, 20 Jun 2024 21:10:04 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 20, 2024, 5:15:49 PM (10 days ago) Jun 20
      to Adam Raine, Paul Irish, Andres Olivares, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      File front_end/models/trace/lantern/metrics/FirstContentfulPaint.test.ts
      Line 11, Patchset 6:// @ts-nocheck
      Andres Olivares . resolved

      ditto: tracking bug (and other ts-nochecks)

      Connor Clark

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 8
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Thu, 20 Jun 2024 21:15:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Andres Olivares <and...@chromium.org>
      satisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 21, 2024, 2:57:45 AM (9 days ago) Jun 21
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Connor Clark
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 9
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 06:57:40 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 6:55:25 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 3 comments

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      File front_end/models/trace/LanternComputationData.ts
      Adam Raine . unresolved

      Why is this file outside the `trace/lantern` folder?

      Connor Clark

      Circular dependencies. I forget the details.

      Jack Franklin

      can we log a bug for this?

      Line 13, Patchset 9 (Latest):import {MetricName} from './handlers/PageLoadMetricsHandler.js';
      import {type TraceParseData} from './handlers/types.js';
      import * as Lantern from './lantern/lantern.js';
      import {type MicroSeconds} from './types/Timing.js';
      import {type TraceEvents} from './types/types.js';
      Jack Franklin . unresolved

      these imports don't follow the DevTools pattern (and I think will break in a release build).

      Any time you import a file from another module (e.g. folder) you need to use that folder's entry point (the file named the same as the folder)

      So these need to be:

      ```
      import * as Handlers from './handlers/handlers.js'
      import * as Lantern from './lantern/lantern.js'
      import * as Types from './types/types.js'
      ```

      I am surprised the ESLint rule we have didn't detect this case.

      Unfortunately this does lead to more verbose code...but without this our prod bundle will likely not work.

      (on a separate note, I agree this file should ideally be within the lantern module. If it can't be for now, let's file a bug and try to move it in a follow-up CL)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Connor Clark
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 9
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 10:55:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Adam Raine <asr...@chromium.org>
      Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 6:57:43 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 1 comment

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9 (Latest):import {BaseNode, type Node} from '../BaseNode.js';
      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . unresolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Gerrit-Comment-Date: Fri, 21 Jun 2024 10:57:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 21, 2024, 8:51:58 AM (9 days ago) Jun 21
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9 (Latest):import {BaseNode, type Node} from '../BaseNode.js';
      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . unresolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Connor Clark

      I assume this is why the layout tests are failing, but the other tests are fine in CI? I wasn't able to get an error message to debug that further.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 9
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 12:51:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 8:52:53 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 1 comment

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9 (Latest):import {BaseNode, type Node} from '../BaseNode.js';
      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . unresolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Connor Clark

      I assume this is why the layout tests are failing, but the other tests are fine in CI? I wasn't able to get an error message to debug that further.

      Jack Franklin

      Yeah I expect so.

      You could run a release build locally and you would probably see the error if you try to run the performance panel

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Connor Clark
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 9
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 12:52:48 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 21, 2024, 9:01:11 AM (9 days ago) Jun 21
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9 (Latest):import {BaseNode, type Node} from '../BaseNode.js';
      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . unresolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Connor Clark

      I assume this is why the layout tests are failing, but the other tests are fine in CI? I wasn't able to get an error message to debug that further.

      Jack Franklin

      Yeah I expect so.

      You could run a release build locally and you would probably see the error if you try to run the performance panel

      Connor Clark

      Release is the default right? My args.gn is empty. Not seeing any errors running DevTools locally.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 9
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:01:06 +0000
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 21, 2024, 9:22:39 AM (9 days ago) Jun 21
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      File front_end/models/trace/LanternComputationData.ts
      Adam Raine . unresolved

      Why is this file outside the `trace/lantern` folder?

      Connor Clark

      Circular dependencies. I forget the details.

      Jack Franklin

      can we log a bug for this?

      Connor Clark

      Semantically I think this file belongs here. It is taking the result of the trace engine and forming it into inputs for Lantern.

      Trying to get the lantern module to depend on the trace module, which itself exports Lantern, is the dep. cycle:

      ```
      ERROR Dependency cycle:
      //front_end/models/trace:trace ->
      //front_end/models/trace/lantern:bundle ->
      //front_end/models/trace/lantern:devtools_entrypoint-bundle-typescript ->
      //front_end/models/trace/lantern:lantern ->
      //front_end/models/trace:trace
      ```

      Am I missing something that would allow code to be structured this way? I think this needs to be where it currently resides.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 10
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:22:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 21, 2024, 9:24:15 AM (9 days ago) Jun 21
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      Patchset-level comments
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      Connor Clark

      I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:24:09 +0000
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 9:33:53 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 2 comments

      Patchset-level comments
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      Connor Clark

      I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

      Jack Franklin

      See my two other comments for examples in context, but TL;DR is:

      1. You must import from the entry point if you are importing from another module (aka folder)
      GOOD: import * as X from './x/x.js';
      BAD: import {Something} from './x/some-sub-module.js';

      2. You can only import from the non-entrypoint if you are within that module's folder.

      So `x/one.js` can import directly from `x/two.js`, if you want to import from `y/one.js`, you have to access it via `y/y.js` (the entrypoint)

      File front_end/models/trace/LanternComputationData.ts
      Adam Raine . resolved

      Why is this file outside the `trace/lantern` folder?

      Connor Clark

      Circular dependencies. I forget the details.

      Jack Franklin

      can we log a bug for this?

      Connor Clark

      Semantically I think this file belongs here. It is taking the result of the trace engine and forming it into inputs for Lantern.

      Trying to get the lantern module to depend on the trace module, which itself exports Lantern, is the dep. cycle:

      ```
      ERROR Dependency cycle:
      //front_end/models/trace:trace ->
      //front_end/models/trace/lantern:bundle ->
      //front_end/models/trace/lantern:devtools_entrypoint-bundle-typescript ->
      //front_end/models/trace/lantern:lantern ->
      //front_end/models/trace:trace
      ```

      Am I missing something that would allow code to be structured this way? I think this needs to be where it currently resides.

      Jack Franklin

      Ah sorry for causing confusion - I was going off Adam's comment and thought maybe this wasn't the right home for it. If it is then let's leave it!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Connor Clark
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 10
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:33:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 9:37:44 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 1 comment

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9:import {BaseNode, type Node} from '../BaseNode.js';

      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . unresolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Connor Clark

      I assume this is why the layout tests are failing, but the other tests are fine in CI? I wasn't able to get an error message to debug that further.

      Jack Franklin

      Yeah I expect so.

      You could run a release build locally and you would probably see the error if you try to run the performance panel

      Connor Clark

      Release is the default right? My args.gn is empty. Not seeing any errors running DevTools locally.

      Jack Franklin

      I think `is_debug` defaults to true.

      So you need to do a build with is_debug = false

      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:37:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
      satisfied_requirement
      open
      diffy

      Jack Franklin (Gerrit)

      unread,
      Jun 21, 2024, 9:40:03 AM (9 days ago) Jun 21
      to Connor Clark, Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Paul Irish and Yang Guo

      Jack Franklin added 1 comment

      File front_end/models/trace/LanternComputationData.ts
      Line 13, Patchset 9:import {MetricName} from './handlers/PageLoadMetricsHandler.js';

      import {type TraceParseData} from './handlers/types.js';
      import * as Lantern from './lantern/lantern.js';
      import {type MicroSeconds} from './types/Timing.js';
      import {type TraceEvents} from './types/types.js';
      Jack Franklin . unresolved

      these imports don't follow the DevTools pattern (and I think will break in a release build).

      Any time you import a file from another module (e.g. folder) you need to use that folder's entry point (the file named the same as the folder)

      So these need to be:

      ```
      import * as Handlers from './handlers/handlers.js'
      import * as Lantern from './lantern/lantern.js'
      import * as Types from './types/types.js'
      ```

      I am surprised the ESLint rule we have didn't detect this case.

      Unfortunately this does lead to more verbose code...but without this our prod bundle will likely not work.

      (on a separate note, I agree this file should ideally be within the lantern module. If it can't be for now, let's file a bug and try to move it in a follow-up CL)

      Jack Franklin

      "(on a separate note, I agree this file should ideally be within the lantern module. If it can't be for now, let's file a bug and try to move it in a follow-up CL)"

      ignore this bit, I don't think this now 😄

      Gerrit-Comment-Date: Fri, 21 Jun 2024 13:39:57 +0000
      satisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 21, 2024, 1:32:00 PM (9 days ago) Jun 21
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 2 comments

      File front_end/models/trace/LanternComputationData.ts
      Line 13, Patchset 9:import {MetricName} from './handlers/PageLoadMetricsHandler.js';
      import {type TraceParseData} from './handlers/types.js';
      import * as Lantern from './lantern/lantern.js';
      import {type MicroSeconds} from './types/Timing.js';
      import {type TraceEvents} from './types/types.js';
      Jack Franklin . resolved

      these imports don't follow the DevTools pattern (and I think will break in a release build).

      Any time you import a file from another module (e.g. folder) you need to use that folder's entry point (the file named the same as the folder)

      So these need to be:

      ```
      import * as Handlers from './handlers/handlers.js'
      import * as Lantern from './lantern/lantern.js'
      import * as Types from './types/types.js'
      ```

      I am surprised the ESLint rule we have didn't detect this case.

      Unfortunately this does lead to more verbose code...but without this our prod bundle will likely not work.

      (on a separate note, I agree this file should ideally be within the lantern module. If it can't be for now, let's file a bug and try to move it in a follow-up CL)

      Jack Franklin

      "(on a separate note, I agree this file should ideally be within the lantern module. If it can't be for now, let's file a bug and try to move it in a follow-up CL)"

      ignore this bit, I don't think this now 😄

      Connor Clark

      Done

      File front_end/models/trace/lantern/BaseNode.ts
      Line 254, Patchset 12 (Latest): traverseGenerator(getNextNodes?: (arg0: Node) => Node[]):
      Connor Clark . unresolved

      what formatter does cdt use?

      note how it mangled the iterator function syntax here

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 12
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Jun 2024 17:31:56 +0000
      unsatisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 25, 2024, 1:24:10 PM (5 days ago) Jun 25
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 2 comments

      File front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
      Line 11, Patchset 9:import {BaseNode, type Node} from '../BaseNode.js';
      import {type Extras, Metric} from '../Metric.js';
      import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from '../TBTUtils.js';
      Jack Franklin . resolved

      I think these imports may be problematic in DevTools too because of how release builds get bundled - these files will not exist in a release build

      I'd suggest moving the contents of the metrics/ folder up a level (you can import files from the same folder at the same level), or putting these files into another module (lantern/core or something) to enable you to do `import * as Core from '../core/core.js'`

      (yes this frustrating...but not something that is going to change)

      Connor Clark

      I assume this is why the layout tests are failing, but the other tests are fine in CI? I wasn't able to get an error message to debug that further.

      Jack Franklin

      Yeah I expect so.

      You could run a release build locally and you would probably see the error if you try to run the performance panel

      Connor Clark

      Release is the default right? My args.gn is empty. Not seeing any errors running DevTools locally.

      Jack Franklin

      I think `is_debug` defaults to true.

      So you need to do a build with is_debug = false

      Connor Clark

      This is resolved - layout tests are working now.

      Note that this file and the ones it imports are all within the same devtools module.

      File front_end/models/trace/lantern/types/lantern.ts
      Connor Clark . resolved

      Someone either knowledgable about software licenses, or at least with an opinion, please weigh in on if I should simply delete these License comments from the original source files.

      A potential option might be to put the license in a LICENSE file in the `lantern` folder.

      I think outright deleting it is not correct, because Chromium != Google, right? So while the CLA we have LH contributors sign assigns ownership to Google, does that mean a Chromium tree can treat it like it owns it? shrug.

      Connor Clark

      btw "treat it like it owns it" in this case mean, ignoring the requirements of the license to include the license text in derivative works. If one owns the rights to the code, that requirement doesn't apply.

      Jack Franklin

      @yan...@chromium.org might be able to aid here or know the best person to talk to

      Paul Irish

      gemini, at least, says this is fine, but has guidance around attribution: https://g.co/gemini/share/bfdb4e58552c

      Connor Clark

      I removed the extra license comments and wrote a notice in the directory README.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 14
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Tue, 25 Jun 2024 17:24:05 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
      Comment-In-Reply-To: Paul Irish <paul...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 26, 2024, 12:54:14 AM (4 days ago) Jun 26
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 1 comment

      Patchset-level comments
      File-level comment, Patchset 15 (Latest):
      Connor Clark . resolved

      seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 15
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Wed, 26 Jun 2024 04:54:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 26, 2024, 5:20:09 AM (4 days ago) Jun 26
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares added 4 comments

      Patchset-level comments
      Connor Clark . unresolved

      seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

      Andres Olivares

      mmm this is weird. Reading the failures at https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true, it doesn't seem expected and it's likely something specific to this cl.

      what are the layout tests you refer to?

      File front_end/models/trace/lantern/BaseNode.ts
      Line 254, Patchset 12: traverseGenerator(getNextNodes?: (arg0: Node) => Node[]):
      Connor Clark . unresolved

      what formatter does cdt use?

      note how it mangled the iterator function syntax here

      Andres Olivares

      we use clang (https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git).

      When undesired stuff like this happens you can surround the affected code with
      ```
      // clang-format off
      ...
      // clang-format on
      ```

      to prevent the mangling

      File front_end/models/trace/lantern/lantern.ts
      Line 47, Patchset 15 (Latest):
      Andres Olivares . unresolved

      bundle files in dt usually export the content of all files in the module like
      ```
      import * as FileName1 from 'Filename1.ts'
      import * as FileName2 from 'Filename2.ts'
      ...

      export {
      FileName1,
      FileName2
      ...
      }
      ```

      I think the way we are doing it here should work with dt bundling so using this pattern is not strictly required, but the way we import stuff from this module would look a bit different. I don't feel strongly about it tho but maybe it's worth considering if the refactoring to accomodate to this is straight forward. If it is turns out being too much refactoring then feel free to ignore. (sorry for not catching this before). (same for metrics.ts)

      File front_end/models/trace/lantern/metrics/TBTUtils.ts
      Line 5, Patchset 15 (Latest):/**
      * @license
      * Copyright 2021 Google LLC
      * SPDX-License-Identifier: Apache-2.0
      */
      Andres Olivares . unresolved

      per the previous comments, I think you meant to remove these license headers? (there are other files with these remaining too)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Connor Clark
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 15
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Connor Clark <cja...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Wed, 26 Jun 2024 09:20:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Connor Clark <cja...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 26, 2024, 5:47:13 AM (4 days ago) Jun 26
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares added 1 comment

      Patchset-level comments
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      Connor Clark

      I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

      Jack Franklin

      See my two other comments for examples in context, but TL;DR is:

      1. You must import from the entry point if you are importing from another module (aka folder)
      GOOD: import * as X from './x/x.js';
      BAD: import {Something} from './x/some-sub-module.js';

      2. You can only import from the non-entrypoint if you are within that module's folder.

      So `x/one.js` can import directly from `x/two.js`, if you want to import from `y/one.js`, you have to access it via `y/y.js` (the entrypoint)

      Andres Olivares

      Interesting. The way it's implemented right now, all files belong to the same single build module (even if inside different folders). This allows to organize the files nicely while preventing cirular dependencies at build time when imports are added across folders. It also makes it possible for files from one folder to import files from another directly (not via a entrypoint file / bundle file).

      My guess would be that this should be fine because this will all end up being bundled into lantern.js. However the devtools browser test failures seem to indicate otherwise, because they error when devtools modules are tried to be loaded in the test environment (https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true).

      I wonder if there's a set of imports that violates how the bundler works that we can fix easily. Otherwise, I think we would need to stick to the usual pattern of defining one entry point per folder/module (we have the `ts` entry point files but are missing the corresponding BUILD.gn file for each) and ensure we use a module's entrypoint when importing from another module. Doing this would likely cause circular dependencies so we would have to split the stuff into more submodules, which is annoying but likely needed if we don't find the culprit in the current implementation.

      Gerrit-Comment-Date: Wed, 26 Jun 2024 09:47:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 26, 2024, 5:49:51 AM (4 days ago) Jun 26
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares added 1 comment

      Patchset-level comments
      Connor Clark . resolved

      seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

      Andres Olivares

      mmm this is weird. Reading the failures at https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true, it doesn't seem expected and it's likely something specific to this cl.

      what are the layout tests you refer to?

      Andres Olivares

      resolving as this is discussed in another comment thread

      Gerrit-Comment-Date: Wed, 26 Jun 2024 09:49:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 26, 2024, 7:57:26 AM (4 days ago) Jun 26
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares added 1 comment

      File front_end/models/trace/lantern/lantern.ts
      Line 32, Patchset 15 (Latest):export * as Metrics from './metrics/metrics.js';
      export * as Simulation from './simulation/simulation.js';
      Andres Olivares . unresolved

      after investigating with @szu...@chromium.org, we found out these imports are the culprit of the test failures. Because these entrypoints don't have an associated devtools module (no build.gn file on those folders) they don't make it to the runtime.

      two options are available:

      1. moving `/metrics/metrics.js` and `./simulation/simulation.js` into the parent folder (`lantern/`)

      or

      2. creating actual devtools modules for metrics/ and simulation/ (by creating the corresponding BUILD.gn files.

      I think 2 is likely going to cause circular dependencies and as such will be more painful to do, but I don't have a strong preferrence!

      Gerrit-Comment-Date: Wed, 26 Jun 2024 11:57:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 26, 2024, 1:11:59 PM (4 days ago) Jun 26
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 3 comments

      Patchset-level comments
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      Connor Clark

      I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

      Jack Franklin

      See my two other comments for examples in context, but TL;DR is:

      1. You must import from the entry point if you are importing from another module (aka folder)
      GOOD: import * as X from './x/x.js';
      BAD: import {Something} from './x/some-sub-module.js';

      2. You can only import from the non-entrypoint if you are within that module's folder.

      So `x/one.js` can import directly from `x/two.js`, if you want to import from `y/one.js`, you have to access it via `y/y.js` (the entrypoint)

      Andres Olivares

      Interesting. The way it's implemented right now, all files belong to the same single build module (even if inside different folders). This allows to organize the files nicely while preventing cirular dependencies at build time when imports are added across folders. It also makes it possible for files from one folder to import files from another directly (not via a entrypoint file / bundle file).

      My guess would be that this should be fine because this will all end up being bundled into lantern.js. However the devtools browser test failures seem to indicate otherwise, because they error when devtools modules are tried to be loaded in the test environment (https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true).

      I wonder if there's a set of imports that violates how the bundler works that we can fix easily. Otherwise, I think we would need to stick to the usual pattern of defining one entry point per folder/module (we have the `ts` entry point files but are missing the corresponding BUILD.gn file for each) and ensure we use a module's entrypoint when importing from another module. Doing this would likely cause circular dependencies so we would have to split the stuff into more submodules, which is annoying but likely needed if we don't find the culprit in the current implementation.

      Connor Clark

      I'm thinking my naming of `lowercase/lowercase.ts` files that weren't really devtools entrypoints was messing up the bundler. Perhaps it uses the file naming convention to assume things that are not codified in the BUILD files.

      Connor Clark . resolved

      seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

      Andres Olivares

      mmm this is weird. Reading the failures at https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true, it doesn't seem expected and it's likely something specific to this cl.

      what are the layout tests you refer to?

      Andres Olivares

      resolving as this is discussed in another comment thread

      File front_end/models/trace/lantern/lantern.ts
      Line 32, Patchset 15:export * as Metrics from './metrics/metrics.js';

      export * as Simulation from './simulation/simulation.js';
      Andres Olivares . unresolved

      after investigating with @szu...@chromium.org, we found out these imports are the culprit of the test failures. Because these entrypoints don't have an associated devtools module (no build.gn file on those folders) they don't make it to the runtime.

      two options are available:

      1. moving `/metrics/metrics.js` and `./simulation/simulation.js` into the parent folder (`lantern/`)

      or

      2. creating actual devtools modules for metrics/ and simulation/ (by creating the corresponding BUILD.gn files.

      I think 2 is likely going to cause circular dependencies and as such will be more painful to do, but I don't have a strong preferrence!

      Connor Clark

      Huh, I thought inclusion of those two files in the lantern BUILD devtools_module would have allowed for this.

      100% right about 2) being tough b/c of circular dependencies (between metrics and simulation) - would have to make a third Core module I think (like Jack suggested) but the additional churn is not ideal from the perspective of consuming in Lighthouse. But I wouldn't be against a future refactor down the line.

      I wonder why only a handful of tests seem to fail... prior I had similar bundling issues that failed _every_ layout test, but seeing just 5 fail now made me think it must be something else. Also debugging the web test locally[1] didn't reproduce for me like it did when I forgot a `type` on an TS type export. oh well

      [1] npm run debug-webtest -- --target=Default http/tests/devtools/console/console-preserve-log-x-process-navigation.js

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 16
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Wed, 26 Jun 2024 17:11:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Connor Clark (Gerrit)

      unread,
      Jun 26, 2024, 4:30:20 PM (4 days ago) Jun 26
      to Andres Olivares, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Andres Olivares, Jack Franklin, Paul Irish and Yang Guo

      Connor Clark added 3 comments

      File front_end/models/trace/lantern/BaseNode.ts
      Line 254, Patchset 12: traverseGenerator(getNextNodes?: (arg0: Node) => Node[]):
      Connor Clark . resolved

      what formatter does cdt use?

      note how it mangled the iterator function syntax here

      Andres Olivares

      we use clang (https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git).

      When undesired stuff like this happens you can surround the affected code with
      ```
      // clang-format off
      ...
      // clang-format on
      ```

      to prevent the mangling

      Connor Clark

      Done

      File front_end/models/trace/lantern/lantern.ts
      Andres Olivares . unresolved

      bundle files in dt usually export the content of all files in the module like
      ```
      import * as FileName1 from 'Filename1.ts'
      import * as FileName2 from 'Filename2.ts'
      ...

      export {
      FileName1,
      FileName2
      ...
      }
      ```

      I think the way we are doing it here should work with dt bundling so using this pattern is not strictly required, but the way we import stuff from this module would look a bit different. I don't feel strongly about it tho but maybe it's worth considering if the refactoring to accomodate to this is straight forward. If it is turns out being too much refactoring then feel free to ignore. (sorry for not catching this before). (same for metrics.ts)

      Connor Clark

      I modified these module files a bit, but anything further is a lot more refactoring so I've left it as a TODO.

      File front_end/models/trace/lantern/metrics/TBTUtils.ts

      * @license
      * Copyright 2021 Google LLC
      * SPDX-License-Identifier: Apache-2.0
      */
      Andres Olivares . resolved

      per the previous comments, I think you meant to remove these license headers? (there are other files with these remaining too)

      Connor Clark

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Andres Olivares
      • Jack Franklin
      • Paul Irish
      • Yang Guo
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
      Gerrit-Change-Number: 5635855
      Gerrit-PatchSet: 18
      Gerrit-Owner: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
      Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
      Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
      Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
      Gerrit-CC: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
      Gerrit-Attention: Andres Olivares <and...@chromium.org>
      Gerrit-Attention: Adam Raine <asr...@chromium.org>
      Gerrit-Attention: Yang Guo <yan...@chromium.org>
      Gerrit-Attention: Paul Irish <paul...@chromium.org>
      Gerrit-Comment-Date: Wed, 26 Jun 2024 20:30:16 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Andres Olivares (Gerrit)

      unread,
      Jun 27, 2024, 5:32:01 AM (3 days ago) Jun 27
      to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

      Andres Olivares voted and added 3 comments

      Votes added by Andres Olivares

      Code-Review+1

      3 comments

      Patchset-level comments
      Jack Franklin . unresolved

      Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

      All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

      Connor Clark

      I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

      Jack Franklin

      See my two other comments for examples in context, but TL;DR is:

      1. You must import from the entry point if you are importing from another module (aka folder)
      GOOD: import * as X from './x/x.js';
      BAD: import {Something} from './x/some-sub-module.js';

      2. You can only import from the non-entrypoint if you are within that module's folder.

      So `x/one.js` can import directly from `x/two.js`, if you want to import from `y/one.js`, you have to access it via `y/y.js` (the entrypoint)

      Andres Olivares

      Interesting. The way it's implemented right now, all files belong to the same single build module (even if inside different folders). This allows to organize the files nicely while preventing cirular dependencies at build time when imports are added across folders. It also makes it possible for files from one folder to import files from another directly (not via a entrypoint file / bundle file).

      My guess would be that this should be fine because this will all end up being bundled into lantern.js. However the devtools browser test failures seem to indicate otherwise, because they error when devtools modules are tried to be loaded in the test environment (https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true).

      I wonder if there's a set of imports that violates how the bundler works that we can fix easily. Otherwise, I think we would need to stick to the usual pattern of defining one entry point per folder/module (we have the `ts` entry point files but are missing the corresponding BUILD.gn file for each) and ensure we use a module's entrypoint when importing from another module. Doing this would likely cause circular dependencies so we would have to split the stuff into more submodules, which is annoying but likely needed if we don't find the culprit in the current implementation.

      Connor Clark

      I'm thinking my naming of `lowercase/lowercase.ts` files that weren't really devtools entrypoints was messing up the bundler. Perhaps it uses the file naming convention to assume things that are not codified in the BUILD files.

      Andres Olivares

      yes this should also work! Nonetheless, I'd suggest that as a non-blocker we really try to stick as closely as we can to devtools pattern in the near future

      File front_end/models/trace/lantern/lantern.ts
      Line 32, Patchset 15:export * as Metrics from './metrics/metrics.js';
      export * as Simulation from './simulation/simulation.js';
      Andres Olivares . unresolved

      after investigating with @szu...@chromium.org, we found out these imports are the culprit of the test failures. Because these entrypoints don't have an associated devtools module (no build.gn file on those folders) they don't make it to the runtime.

      two options are available:

      1. moving `/metrics/metrics.js` and `./simulation/simulation.js` into the parent folder (`lantern/`)

      or

      2. creating actual devtools modules for metrics/ and simulation/ (by creating the corresponding BUILD.gn files.

      I think 2 is likely going to cause circular dependencies and as such will be more painful to do, but I don't have a strong preferrence!

      Connor Clark

      Huh, I thought inclusion of those two files in the lantern BUILD devtools_module would have allowed for this.

      100% right about 2) being tough b/c of circular dependencies (between metrics and simulation) - would have to make a third Core module I think (like Jack suggested) but the additional churn is not ideal from the perspective of consuming in Lighthouse. But I wouldn't be against a future refactor down the line.

      I wonder why only a handful of tests seem to fail... prior I had similar bundling issues that failed _every_ layout test, but seeing just 5 fail now made me think it must be something else. Also debugging the web test locally[1] didn't reproduce for me like it did when I forgot a `type` on an TS type export. oh well

      [1] npm run debug-webtest -- --target=Default http/tests/devtools/console/console-preserve-log-x-process-navigation.js

      Andres Olivares

      it seems no tests are failing in cq now?

      Line 47, Patchset 15:
      Andres Olivares . resolved

      bundle files in dt usually export the content of all files in the module like
      ```
      import * as FileName1 from 'Filename1.ts'
      import * as FileName2 from 'Filename2.ts'
      ...

      export {
      FileName1,
      FileName2
      ...
      }
      ```

      I think the way we are doing it here should work with dt bundling so using this pattern is not strictly required, but the way we import stuff from this module would look a bit different. I don't feel strongly about it tho but maybe it's worth considering if the refactoring to accomodate to this is straight forward. If it is turns out being too much refactoring then feel free to ignore. (sorry for not catching this before). (same for metrics.ts)

      Connor Clark

      I modified these module files a bit, but anything further is a lot more refactoring so I've left it as a TODO.

      Andres Olivares

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Raine
      • Connor Clark
      • Jack Franklin
      • Paul Irish
      • Yang Guo
        Submit Requirements:
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: devtools/devtools-frontend
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
        Gerrit-Change-Number: 5635855
        Gerrit-PatchSet: 18
        Gerrit-Owner: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
        Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
        Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
        Gerrit-CC: Yang Guo <yan...@chromium.org>
        Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
        Gerrit-Attention: Adam Raine <asr...@chromium.org>
        Gerrit-Attention: Yang Guo <yan...@chromium.org>
        Gerrit-Attention: Connor Clark <cja...@chromium.org>
        Gerrit-Attention: Paul Irish <paul...@chromium.org>
        Gerrit-Comment-Date: Thu, 27 Jun 2024 09:31:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
        satisfied_requirement
        open
        diffy

        Andres Olivares (Gerrit)

        unread,
        Jun 27, 2024, 5:37:15 AM (3 days ago) Jun 27
        to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

        Andres Olivares added 1 comment

        Patchset-level comments
        Connor Clark . resolved

        seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

        Andres Olivares

        mmm this is weird. Reading the failures at https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true, it doesn't seem expected and it's likely something specific to this cl.

        what are the layout tests you refer to?

        Andres Olivares

        resolving as this is discussed in another comment thread

        Connor Clark

        these ones btw https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel_fastbuild/17974/test-results?sortby=&groupby=

        Andres Olivares

        ah I missed this. These seem to be flakes and unrelated to this CL. They have been failing in other CLs too:

        https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel_fastbuild/17998/test-results?sortby=&groupby=

        Gerrit-Comment-Date: Thu, 27 Jun 2024 09:37:09 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy

        Andres Olivares (Gerrit)

        unread,
        Jun 27, 2024, 5:38:26 AM (3 days ago) Jun 27
        to Connor Clark, Paul Irish, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Adam Raine, Connor Clark, Jack Franklin, Paul Irish and Yang Guo

        Andres Olivares added 1 comment

        Patchset-level comments
        Connor Clark . resolved

        seems random layout tests (just ~5) are failing in CI, but not locally for me. expected?

        Andres Olivares

        mmm this is weird. Reading the failures at https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true, it doesn't seem expected and it's likely something specific to this cl.

        what are the layout tests you refer to?

        Andres Olivares

        resolving as this is discussed in another comment thread

        Connor Clark

        these ones btw https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel_fastbuild/17974/test-results?sortby=&groupby=

        Andres Olivares

        ah I missed this. These seem to be flakes and unrelated to this CL. They have been failing in other CLs too:

        https://ci.chromium.org/ui/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel_fastbuild/17998/test-results?sortby=&groupby=

        Gerrit-Comment-Date: Thu, 27 Jun 2024 09:38:21 +0000
        satisfied_requirement
        open
        diffy

        Paul Irish (Gerrit)

        unread,
        Jun 27, 2024, 3:00:52 PM (3 days ago) Jun 27
        to Connor Clark, Andres Olivares, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Adam Raine, Connor Clark, Jack Franklin and Yang Guo

        Paul Irish voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Raine
        • Connor Clark
        • Jack Franklin
        • Yang Guo
        Submit Requirements:
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: devtools/devtools-frontend
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
        Gerrit-Change-Number: 5635855
        Gerrit-PatchSet: 18
        Gerrit-Owner: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
        Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
        Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
        Gerrit-CC: Yang Guo <yan...@chromium.org>
        Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
        Gerrit-Attention: Adam Raine <asr...@chromium.org>
        Gerrit-Attention: Yang Guo <yan...@chromium.org>
        Gerrit-Attention: Connor Clark <cja...@chromium.org>
        Gerrit-Comment-Date: Thu, 27 Jun 2024 19:00:49 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Connor Clark (Gerrit)

        unread,
        Jun 27, 2024, 4:17:39 PM (3 days ago) Jun 27
        to Paul Irish, Andres Olivares, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Adam Raine, Jack Franklin and Yang Guo

        Connor Clark added 2 comments

        Patchset-level comments
        File-level comment, Patchset 9:
        Jack Franklin . resolved

        Not going to leave a -1 review, because I am OOO next week and do not want to block, but please make sure the imports are updated to follow the DevTools convention before this lands.

        All imports that import from a different module must use the entry point to do so. In a release build a module is bundled up to all be contained in its entry point, and hence in our code we have to follow-suit. It might work in dev (where we don't bundle) but broken imports will cause release build breakage.

        Connor Clark

        I'm unclear exactly what's disallowed since the linter isn't being helpful, but can we assume that if the layout tests are passing then this issue is resolved?

        Jack Franklin

        See my two other comments for examples in context, but TL;DR is:

        1. You must import from the entry point if you are importing from another module (aka folder)
        GOOD: import * as X from './x/x.js';
        BAD: import {Something} from './x/some-sub-module.js';

        2. You can only import from the non-entrypoint if you are within that module's folder.

        So `x/one.js` can import directly from `x/two.js`, if you want to import from `y/one.js`, you have to access it via `y/y.js` (the entrypoint)

        Andres Olivares

        Interesting. The way it's implemented right now, all files belong to the same single build module (even if inside different folders). This allows to organize the files nicely while preventing cirular dependencies at build time when imports are added across folders. It also makes it possible for files from one folder to import files from another directly (not via a entrypoint file / bundle file).

        My guess would be that this should be fine because this will all end up being bundled into lantern.js. However the devtools browser test failures seem to indicate otherwise, because they error when devtools modules are tried to be loaded in the test environment (https://chromium-swarm.appspot.com/task?id=6a6a2c02f5559710&w=true).

        I wonder if there's a set of imports that violates how the bundler works that we can fix easily. Otherwise, I think we would need to stick to the usual pattern of defining one entry point per folder/module (we have the `ts` entry point files but are missing the corresponding BUILD.gn file for each) and ensure we use a module's entrypoint when importing from another module. Doing this would likely cause circular dependencies so we would have to split the stuff into more submodules, which is annoying but likely needed if we don't find the culprit in the current implementation.

        Connor Clark

        I'm thinking my naming of `lowercase/lowercase.ts` files that weren't really devtools entrypoints was messing up the bundler. Perhaps it uses the file naming convention to assume things that are not codified in the BUILD files.

        Andres Olivares

        yes this should also work! Nonetheless, I'd suggest that as a non-blocker we really try to stick as closely as we can to devtools pattern in the near future

        Connor Clark

        I'll start on a follow-up CL to resolve this today.

        File front_end/models/trace/lantern/lantern.ts
        Line 32, Patchset 15:export * as Metrics from './metrics/metrics.js';
        export * as Simulation from './simulation/simulation.js';
        Andres Olivares . resolved

        after investigating with @szu...@chromium.org, we found out these imports are the culprit of the test failures. Because these entrypoints don't have an associated devtools module (no build.gn file on those folders) they don't make it to the runtime.

        two options are available:

        1. moving `/metrics/metrics.js` and `./simulation/simulation.js` into the parent folder (`lantern/`)

        or

        2. creating actual devtools modules for metrics/ and simulation/ (by creating the corresponding BUILD.gn files.

        I think 2 is likely going to cause circular dependencies and as such will be more painful to do, but I don't have a strong preferrence!

        Connor Clark

        Huh, I thought inclusion of those two files in the lantern BUILD devtools_module would have allowed for this.

        100% right about 2) being tough b/c of circular dependencies (between metrics and simulation) - would have to make a third Core module I think (like Jack suggested) but the additional churn is not ideal from the perspective of consuming in Lighthouse. But I wouldn't be against a future refactor down the line.

        I wonder why only a handful of tests seem to fail... prior I had similar bundling issues that failed _every_ layout test, but seeing just 5 fail now made me think it must be something else. Also debugging the web test locally[1] didn't reproduce for me like it did when I forgot a `type` on an TS type export. oh well

        [1] npm run debug-webtest -- --target=Default http/tests/devtools/console/console-preserve-log-x-process-navigation.js

        Andres Olivares

        it seems no tests are failing in cq now?

        Connor Clark

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Raine
        • Jack Franklin
        • Yang Guo
        Submit Requirements:
        • requirement satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: devtools/devtools-frontend
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
        Gerrit-Change-Number: 5635855
        Gerrit-PatchSet: 18
        Gerrit-Owner: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
        Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
        Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-CC: Jack Franklin <jacktf...@chromium.org>
        Gerrit-CC: Yang Guo <yan...@chromium.org>
        Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
        Gerrit-Attention: Adam Raine <asr...@chromium.org>
        Gerrit-Attention: Yang Guo <yan...@chromium.org>
        Gerrit-Comment-Date: Thu, 27 Jun 2024 20:17:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
        satisfied_requirement
        open
        diffy

        Connor Clark (Gerrit)

        unread,
        Jun 27, 2024, 4:17:53 PM (3 days ago) Jun 27
        to Paul Irish, Andres Olivares, Adam Raine, Yang Guo, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Adam Raine, Jack Franklin and Yang Guo

        Connor Clark voted Commit-Queue+2

        Commit-Queue+2
        Gerrit-Comment-Date: Thu, 27 Jun 2024 20:17:50 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Devtools-frontend LUCI CQ (Gerrit)

        unread,
        Jun 27, 2024, 4:58:37 PM (3 days ago) Jun 27
        to Connor Clark, Paul Irish, Andres Olivares, Adam Raine, Yang Guo, Jack Franklin, devtools-rev...@chromium.org

        Devtools-frontend LUCI CQ submitted the change

        Change information

        Commit message:
        [trace engine] Add Lighthouse's Lantern library

        This is the culmination of isolating Lighthouse's Lantern library
        (https://github.com/GoogleChrome/lighthouse/issues/15841). The code in
        this CL took Lantern as it now exists in Lighthouse, converted to
        TypeScript, integrated its unit tests (Jest -> Karma conversion), and
        resolved the majority of CDT's JavaScript linter errors.

        There is no behavior change to CDT with this CL, besides TraceModel
        exporting the Lantern module.

        There is some refactoring work remaining, captured by
        crbug.com/348449529
        Bug: 335099340
        Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
        Reviewed-by: Paul Irish <paul...@chromium.org>
        Reviewed-by: Andres Olivares <and...@chromium.org>
        Commit-Queue: Connor Clark <cja...@chromium.org>
        Files:
        • M config/gni/devtools_grd_files.gni
        • M front_end/BUILD.gn
        • M front_end/models/trace/BUILD.gn
        • A front_end/models/trace/LanternComputationData.ts
        • A front_end/models/trace/lantern/.eslintrc.js
        • A front_end/models/trace/lantern/BUILD.gn
        • A front_end/models/trace/lantern/BaseNode.test.ts
        • A front_end/models/trace/lantern/BaseNode.ts
        • A front_end/models/trace/lantern/CPUNode.ts
        • A front_end/models/trace/lantern/LanternError.ts
        • A front_end/models/trace/lantern/MetricsModule.ts
        • A front_end/models/trace/lantern/NetworkNode.ts
        • A front_end/models/trace/lantern/PageDependencyGraph.test.ts
        • A front_end/models/trace/lantern/PageDependencyGraph.ts
        • A front_end/models/trace/lantern/README.md
        • A front_end/models/trace/lantern/SimulationModule.ts
        • A front_end/models/trace/lantern/lantern.ts
        • A front_end/models/trace/lantern/metrics/FirstContentfulPaint.test.ts
        • A front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts
        • A front_end/models/trace/lantern/metrics/Interactive.test.ts
        • A front_end/models/trace/lantern/metrics/Interactive.ts
        • A front_end/models/trace/lantern/metrics/LargestContentfulPaint.test.ts
        • A front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts
        • A front_end/models/trace/lantern/metrics/MaxPotentialFID.ts
        • A front_end/models/trace/lantern/metrics/Metric.ts
        • A front_end/models/trace/lantern/metrics/SpeedIndex.test.ts
        • A front_end/models/trace/lantern/metrics/SpeedIndex.ts
        • A front_end/models/trace/lantern/metrics/TBTUtils.test.ts
        • A front_end/models/trace/lantern/metrics/TBTUtils.ts
        • A front_end/models/trace/lantern/metrics/TotalBlockingTime.ts
        • A front_end/models/trace/lantern/simulation/ConnectionPool.test.ts
        • A front_end/models/trace/lantern/simulation/ConnectionPool.ts
        • A front_end/models/trace/lantern/simulation/Constants.ts
        • A front_end/models/trace/lantern/simulation/DNSCache.test.ts
        • A front_end/models/trace/lantern/simulation/DNSCache.ts
        • A front_end/models/trace/lantern/simulation/NetworkAnalyzer.test.ts
        • A front_end/models/trace/lantern/simulation/NetworkAnalyzer.ts
        • A front_end/models/trace/lantern/simulation/SimulationTimingMap.ts
        • A front_end/models/trace/lantern/simulation/Simulator.test.ts
        • A front_end/models/trace/lantern/simulation/Simulator.ts
        • A front_end/models/trace/lantern/simulation/TCPConnection.test.ts
        • A front_end/models/trace/lantern/simulation/TCPConnection.ts
        • A front_end/models/trace/lantern/testing/MetricTestUtils.ts
        • A front_end/models/trace/lantern/types/lantern.ts
        • M front_end/models/trace/trace.ts
        • M front_end/panels/timeline/fixtures/traces/BUILD.gn
        • A front_end/panels/timeline/fixtures/traces/lantern/README.md
        • A front_end/panels/timeline/fixtures/traces/lantern/iframe/trace.json.gz
        • A front_end/panels/timeline/fixtures/traces/lantern/paul/trace.json.gz
        • A front_end/panels/timeline/fixtures/traces/lantern/progressive-app/trace.json.gz
        • A front_end/panels/timeline/fixtures/traces/lantern/redirect/trace.json.gz
        Change size: XL
        Delta: 51 files changed, 7789 insertions(+), 1 deletion(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Andres Olivares, +1 by Paul Irish
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: devtools/devtools-frontend
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2bf64fc17d334859caca5c42bea1e276465d64c
        Gerrit-Change-Number: 5635855
        Gerrit-PatchSet: 19
        Gerrit-Owner: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Adam Raine <asr...@chromium.org>
        Gerrit-Reviewer: Andres Olivares <and...@chromium.org>
        Gerrit-Reviewer: Connor Clark <cja...@chromium.org>
        Gerrit-Reviewer: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Paul Irish <paul...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages