GoogleChrome / GoogleChrome/lighthouse

Allow any gatherer to be a dependency

Open
#15,368 3 comments 0 reactions 0 assignees View on GitHub
P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

see https://github.com/GoogleChrome/lighthouse/discussions/15367#discussioncomment-6694261

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol

We could either:
1 - explicitly set `symbol` in the meta + as a static property of every gatherer
2 - just use a string (the name of the artifact) - not good for reason mentioned in original comment
3 - define a `symbol` getter on the base gatherer:

```js
static get symbol() {
return Symbol.for(this.name);
}
```
4 - just use a reference to the class directly?

Contributor guide

Open the contributing guide

Research direction

Start with the linked GitHub Discussion and the MDN Symbol reference to understand the dependency collision problem and the proposed alternatives. Then trace how gatherers currently declare and consume dependencies; done means a documented, accepted approach allows any gatherer to be used as a dependency without ambiguity.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.