You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Noticed by @connorjclark over in googleads/publisher-ads-lighthouse-plugin#232
There are two problems at work here:
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.LighthouseRunWarnings
are deduped in gatherRunner, but they're deduped as primitive values. With the introduction ofLH.IcuMessage
in i18n: use IcuMessage objects instead of string IDs #10630,Array.from(new Set(baseArtifacts.LighthouseRunWarnings))
will not effectively dedupe them, since two identicalLH.IcuMessage
s will usually not be the same instance, even if they result in the same warning string. Wouldn't be difficult to use theIcuMessage
shape to dedupe directly, but it might be easiest to do something withlodash.isequal
since it's already in our bundle.The text was updated successfully, but these errors were encountered: