Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: computed artifact keys #13430

Merged
merged 8 commits into from
Nov 30, 2021
Merged

core: computed artifact keys #13430

merged 8 commits into from
Nov 30, 2021

Conversation

adamraine
Copy link
Member

Proposal to resolve #13411

@google-cla google-cla bot added the cla: yes label Nov 24, 2021
* @param {C} computableArtifact
* @param {K & ([keyof FirstParamType<C['compute_']>] extends [K[number]] ? unknown : never)} [keys]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea is to make this required and have TS verify everything.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensures #13411 isn't happening anywhere else.

@@ -7919,18 +7883,6 @@
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:computed:ModuleDuplication",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@adamraine adamraine marked this pull request as ready for review November 29, 2021 23:34
@adamraine adamraine requested a review from a team as a code owner November 29, 2021 23:34
@adamraine adamraine requested review from connorjclark and removed request for a team November 29, 2021 23:34
@brendankenny
Copy link
Member

also computed-artifact-test.js needs some tests :)

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

lighthouse-core/test/computed/computed-artifact-test.js Outdated Show resolved Hide resolved
lighthouse-core/computed/computed-artifact.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Computed artifacts are recomputed accidentally
4 participants