-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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(config): remove gatherer options support #11743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
couldn't find any mention to this feature in markdown files
lighthouse-core/config/config.js
Outdated
} else { | ||
throw new Error('Invalid expanded Gatherer: ' + JSON.stringify(gathererDefn)); | ||
} | ||
}); | ||
|
||
const mergedDefns = mergeOptionsOfItems(gathererDefns); | ||
// De-dupe gatherers by artifact name. | ||
const mergedDefns = Array.from( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this! My kind of PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, hit submit too soon:
Review stolen from @Beytoven with his permission. LGTM!
Co-authored-by: Brendan Kenny <bckenny@gmail.com>
Summary (Why)
Gatherer options as implemented today fundamentally clash with the more useful level of artifact options proposed by FR. They aren't being used anywhere in Lighthouse core and I doubt they ever caught on in custom config land (plugins can't define gatherers). Removing them now will ease the config transition plan with minimal cost.
Summary (What)
Removes support for gatherer options. We added them three years ago at the same time as audit options when we first started playing around with LR and originally planned to utilize them for scoped opportunities until we scrapped that plan before I/O that year and we never ended up using them since.
It's a breaking change because custom gatherers might have discovered gatherer options but they aren't particularly useful if you already own the gatherer implementation so I doubt they caught on much.
There's also a small feature improvement here that de-dupes gatherers by artifact name instead of the file path. This would result on overwriting of artifacts at runtime anyway so they're already being de-duped today, but you don't find out about it until much later.
Related Issues/PRs
ref #11313