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

LigthouseRunWarnings are not completely deduplicated #11514

Closed
brendankenny opened this issue Oct 2, 2020 · 0 comments
Closed

LigthouseRunWarnings are not completely deduplicated #11514

brendankenny opened this issue Oct 2, 2020 · 0 comments
Assignees

Comments

@brendankenny
Copy link
Member

Noticed by @connorjclark over in googleads/publisher-ads-lighthouse-plugin#232

There are two problems at work here:

  1. LighthouseRunWarnings are deduplicated as an artifact in gatherRunner (and there's a test for this), but when they were extended to let audits add warnings, the audit warnings were never deduped. I believe this is what's going on with lighthouse-plugin-publisher-ads.
  2. I don't believe this second problem has been possible yet, but it soon will be. As mentioned, LighthouseRunWarnings are deduped in gatherRunner, but they're deduped as primitive values. With the introduction of LH.IcuMessage in i18n: use IcuMessage objects instead of string IDs #10630, Array.from(new Set(baseArtifacts.LighthouseRunWarnings)) will not effectively dedupe them, since two identical LH.IcuMessages will usually not be the same instance, even if they result in the same warning string. Wouldn't be difficult to use the IcuMessage shape to dedupe directly, but it might be easiest to do something with lodash.isequal since it's already in our bundle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants