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

yarn update:sample-json doesn't work on windows. #9403

Closed
connorjclark opened this issue Jul 18, 2019 · 6 comments · Fixed by #9406
Closed

yarn update:sample-json doesn't work on windows. #9403

connorjclark opened this issue Jul 18, 2019 · 6 comments · Fixed by #9406

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Jul 18, 2019

assert-golden-lhr-unchanged.sh is not OS-independent.

This blocks most contributions from developers using Windows.

@brendankenny
Copy link
Member

assert-golden-lhr-unchanged.sh is not OS-independent.

that seems true, but shouldn't block yarn update:sample-json?

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jul 18, 2019

I ran into in on my windows machine.

ok so it's actually i18n:collect-strings that is being super weird and blocking me from update json/translations/w.e - I don't get anything updated on my windows machine when I run on master (as I did here #9404 on my mac).

Looking at the output.... it seems to be running something other than just node lighthouse-core/scripts/i18n/collect-strings.js ...

yarn i18n:collect-strings:

 yarn i18n:collect-strings
yarn run v1.16.0
$ node lighthouse-core/scripts/i18n/collect-strings.js
Collecting from lighthouse-core\audits\accessibility\accesskeys.js
Collecting from lighthouse-core\audits\accessibility\aria-allowed-attr.js
Collecting from lighthouse-core\audits\accessibility\aria-required-attr.js
Collecting from lighthouse-core\audits\accessibility\aria-required-children.js
Collecting from lighthouse-core\audits\accessibility\aria-required-parent.js
Collecting from lighthouse-core\audits\accessibility\aria-roles.js
Collecting from lighthouse-core\audits\accessibility\aria-valid-attr-value.js
Collecting from lighthouse-core\audits\accessibility\aria-valid-attr.js
Collecting from lighthouse-core\audits\accessibility\audio-caption.js
Collecting from lighthouse-core\audits\accessibility\axe-audit.js
Collecting from lighthouse-core\audits\accessibility\button-name.js
Collecting from lighthouse-core\audits\accessibility\bypass.js
Collecting from lighthouse-core\audits\accessibility\color-contrast.js
Collecting from lighthouse-core\audits\accessibility\definition-list.js
Collecting from lighthouse-core\audits\accessibility\dlitem.js
Collecting from lighthouse-core\audits\accessibility\document-title.js
Collecting from lighthouse-core\audits\accessibility\duplicate-id.js
Collecting from lighthouse-core\audits\accessibility\frame-title.js
Collecting from lighthouse-core\audits\accessibility\html-has-lang.js
Collecting from lighthouse-core\audits\accessibility\html-lang-valid.js
Collecting from lighthouse-core\audits\accessibility\image-alt.js
Collecting from lighthouse-core\audits\accessibility\input-image-alt.js
Collecting from lighthouse-core\audits\accessibility\label.js
Collecting from lighthouse-core\audits\accessibility\layout-table.js
Collecting from lighthouse-core\audits\accessibility\link-name.js
Collecting from lighthouse-core\audits\accessibility\list.js
Collecting from lighthouse-core\audits\accessibility\listitem.js
Collecting from lighthouse-core\audits\accessibility\manual\custom-controls-labels.js
Collecting from lighthouse-core\audits\accessibility\manual\custom-controls-roles.js
Collecting from lighthouse-core\audits\accessibility\manual\focus-traps.js
Collecting from lighthouse-core\audits\accessibility\manual\focusable-controls.js
Collecting from lighthouse-core\audits\accessibility\manual\heading-levels.js
Collecting from lighthouse-core\audits\accessibility\manual\interactive-element-affordance.js
Collecting from lighthouse-core\audits\accessibility\manual\logical-tab-order.js
Collecting from lighthouse-core\audits\accessibility\manual\managed-focus.js
Collecting from lighthouse-core\audits\accessibility\manual\offscreen-content-hidden.js
Collecting from lighthouse-core\audits\accessibility\manual\use-landmarks.js
Collecting from lighthouse-core\audits\accessibility\manual\visual-order-follows-dom.js
Collecting from lighthouse-core\audits\accessibility\meta-refresh.js
Collecting from lighthouse-core\audits\accessibility\meta-viewport.js
Collecting from lighthouse-core\audits\accessibility\object-alt.js
Collecting from lighthouse-core\audits\accessibility\tabindex.js
Collecting from lighthouse-core\audits\accessibility\td-headers-attr.js
Collecting from lighthouse-core\audits\accessibility\th-has-data-cells.js
Collecting from lighthouse-core\audits\accessibility\valid-lang.js
Collecting from lighthouse-core\audits\accessibility\video-caption.js
Collecting from lighthouse-core\audits\accessibility\video-description.js
Collecting from lighthouse-core\audits\apple-touch-icon.js
Collecting from lighthouse-core\audits\audit.js
Collecting from lighthouse-core\audits\bootup-time.js
Collecting from lighthouse-core\audits\byte-efficiency\byte-efficiency-audit.js
Collecting from lighthouse-core\audits\byte-efficiency\efficient-animated-content.js
Collecting from lighthouse-core\audits\byte-efficiency\offscreen-images.js
Collecting from lighthouse-core\audits\byte-efficiency\render-blocking-resources.js
Collecting from lighthouse-core\audits\byte-efficiency\total-byte-weight.js
Collecting from lighthouse-core\audits\byte-efficiency\unminified-css.js
Collecting from lighthouse-core\audits\byte-efficiency\unminified-javascript.js
Collecting from lighthouse-core\audits\byte-efficiency\unused-css-rules.js
Collecting from lighthouse-core\audits\byte-efficiency\unused-javascript.js
Collecting from lighthouse-core\audits\byte-efficiency\uses-long-cache-ttl.js
Collecting from lighthouse-core\audits\byte-efficiency\uses-optimized-images.js
Collecting from lighthouse-core\audits\byte-efficiency\uses-responsive-images.js
Collecting from lighthouse-core\audits\byte-efficiency\uses-text-compression.js
Collecting from lighthouse-core\audits\byte-efficiency\uses-webp-images.js
Collecting from lighthouse-core\audits\content-width.js
Collecting from lighthouse-core\audits\critical-request-chains.js
Collecting from lighthouse-core\audits\deprecations.js
Collecting from lighthouse-core\audits\diagnostics.js
Collecting from lighthouse-core\audits\dobetterweb\appcache-manifest.js
Collecting from lighthouse-core\audits\dobetterweb\doctype.js
Collecting from lighthouse-core\audits\dobetterweb\dom-size.js
Collecting from lighthouse-core\audits\dobetterweb\external-anchors-use-rel-noopener.js
Collecting from lighthouse-core\audits\dobetterweb\geolocation-on-start.js
Collecting from lighthouse-core\audits\dobetterweb\js-libraries.js
Collecting from lighthouse-core\audits\dobetterweb\no-document-write.js
Collecting from lighthouse-core\audits\dobetterweb\no-vulnerable-libraries.js
Collecting from lighthouse-core\audits\dobetterweb\notification-on-start.js
Collecting from lighthouse-core\audits\dobetterweb\password-inputs-can-be-pasted-into.js
Collecting from lighthouse-core\audits\dobetterweb\uses-http2.js
Collecting from lighthouse-core\audits\dobetterweb\uses-passive-event-listeners.js
Collecting from lighthouse-core\audits\errors-in-console.js
Collecting from lighthouse-core\audits\final-screenshot.js
Collecting from lighthouse-core\audits\font-display.js
Collecting from lighthouse-core\audits\image-aspect-ratio.js
Collecting from lighthouse-core\audits\installable-manifest.js
Collecting from lighthouse-core\audits\is-on-https.js
Collecting from lighthouse-core\audits\load-fast-enough-for-pwa.js
Collecting from lighthouse-core\audits\main-thread-tasks.js
Collecting from lighthouse-core\audits\mainthread-work-breakdown.js
Collecting from lighthouse-core\audits\manual\manual-audit.js
Collecting from lighthouse-core\audits\manual\pwa-cross-browser.js
Collecting from lighthouse-core\audits\manual\pwa-each-page-has-url.js
Collecting from lighthouse-core\audits\manual\pwa-page-transitions.js
Collecting from lighthouse-core\audits\metrics\cumulative-long-queuing-delay.js
Collecting from lighthouse-core\audits\metrics\estimated-input-latency.js
Collecting from lighthouse-core\audits\metrics\first-contentful-paint-3g.js
Collecting from lighthouse-core\audits\metrics\first-contentful-paint.js
Collecting from lighthouse-core\audits\metrics\first-cpu-idle.js
Collecting from lighthouse-core\audits\metrics\first-meaningful-paint.js
Collecting from lighthouse-core\audits\metrics\interactive.js
Collecting from lighthouse-core\audits\metrics\max-potential-fid.js
Collecting from lighthouse-core\audits\metrics\speed-index.js
Collecting from lighthouse-core\audits\metrics.js
Collecting from lighthouse-core\audits\mixed-content.js
Collecting from lighthouse-core\audits\multi-check-audit.js
Collecting from lighthouse-core\audits\network-requests.js
Collecting from lighthouse-core\audits\network-rtt.js
Collecting from lighthouse-core\audits\network-server-latency.js
Collecting from lighthouse-core\audits\offline-start-url.js
Collecting from lighthouse-core\audits\performance-budget.js
Collecting from lighthouse-core\audits\predictive-perf.js
Collecting from lighthouse-core\audits\redirects-http.js
Collecting from lighthouse-core\audits\redirects.js
Collecting from lighthouse-core\audits\resource-summary.js
Collecting from lighthouse-core\audits\screenshot-thumbnails.js
Collecting from lighthouse-core\audits\seo\canonical.js
Collecting from lighthouse-core\audits\seo\font-size.js
Collecting from lighthouse-core\audits\seo\hreflang.js
Collecting from lighthouse-core\audits\seo\http-status-code.js
Collecting from lighthouse-core\audits\seo\is-crawlable.js
Collecting from lighthouse-core\audits\seo\link-text.js
Collecting from lighthouse-core\audits\seo\manual\structured-data.js
Collecting from lighthouse-core\audits\seo\meta-description.js
Collecting from lighthouse-core\audits\seo\plugins.js
Collecting from lighthouse-core\audits\seo\robots-txt.js
Collecting from lighthouse-core\audits\seo\tap-targets.js
Collecting from lighthouse-core\audits\service-worker.js
Collecting from lighthouse-core\audits\splash-screen.js
Collecting from lighthouse-core\audits\themed-omnibox.js
Collecting from lighthouse-core\audits\third-party-summary.js
Collecting from lighthouse-core\audits\time-to-first-byte.js
Collecting from lighthouse-core\audits\user-timings.js
Collecting from lighthouse-core\audits\uses-rel-preconnect.js
Collecting from lighthouse-core\audits\uses-rel-preload.js
Collecting from lighthouse-core\audits\viewport.js
Collecting from lighthouse-core\audits\violation-audit.js
Collecting from lighthouse-core\audits\without-javascript.js
Collecting from lighthouse-core\audits\works-offline.js
Collecting from lighthouse-core\computed\computed-artifact.js
Collecting from lighthouse-core\computed\critical-request-chains.js
Collecting from lighthouse-core\computed\load-simulator.js
Collecting from lighthouse-core\computed\main-resource.js
Collecting from lighthouse-core\computed\main-thread-tasks.js
Collecting from lighthouse-core\computed\manifest-values.js
Collecting from lighthouse-core\computed\metrics\cumulative-long-queuing-delay.js
Collecting from lighthouse-core\computed\metrics\estimated-input-latency.js
Collecting from lighthouse-core\computed\metrics\first-contentful-paint.js
Collecting from lighthouse-core\computed\metrics\first-cpu-idle.js
Collecting from lighthouse-core\computed\metrics\first-meaningful-paint.js
Collecting from lighthouse-core\computed\metrics\interactive.js
Collecting from lighthouse-core\computed\metrics\lantern-cumulative-long-queuing-delay.js
Collecting from lighthouse-core\computed\metrics\lantern-estimated-input-latency.js
Collecting from lighthouse-core\computed\metrics\lantern-first-contentful-paint.js
Collecting from lighthouse-core\computed\metrics\lantern-first-cpu-idle.js
Collecting from lighthouse-core\computed\metrics\lantern-first-meaningful-paint.js
Collecting from lighthouse-core\computed\metrics\lantern-interactive.js
Collecting from lighthouse-core\computed\metrics\lantern-max-potential-fid.js
Collecting from lighthouse-core\computed\metrics\lantern-metric.js
Collecting from lighthouse-core\computed\metrics\lantern-speed-index.js
Collecting from lighthouse-core\computed\metrics\max-potential-fid.js
Collecting from lighthouse-core\computed\metrics\metric.js
Collecting from lighthouse-core\computed\metrics\speed-index.js
Collecting from lighthouse-core\computed\network-analysis.js
Collecting from lighthouse-core\computed\network-records.js
Collecting from lighthouse-core\computed\page-dependency-graph.js
Collecting from lighthouse-core\computed\resource-summary.js
Collecting from lighthouse-core\computed\screenshots.js
Collecting from lighthouse-core\computed\speedline.js
Collecting from lighthouse-core\computed\trace-of-tab.js
Collecting from lighthouse-core\computed\user-timings.js
Collecting from lighthouse-core\computed\viewport-meta.js
Collecting from lighthouse-core\config\budget.js
Collecting from lighthouse-core\config\config-helpers.js
Collecting from lighthouse-core\config\config-plugin.js
Collecting from lighthouse-core\config\config.js
Collecting from lighthouse-core\config\constants.js
Collecting from lighthouse-core\config\default-config.js
Collecting from lighthouse-core\config\full-config.js
Collecting from lighthouse-core\config\lr-desktop-config.js
Collecting from lighthouse-core\config\lr-mobile-config.js
Collecting from lighthouse-core\config\mixed-content-config.js
Collecting from lighthouse-core\config\perf-config.js
Collecting from lighthouse-core\gather\connections\connection.js
Collecting from lighthouse-core\gather\connections\cri.js
Collecting from lighthouse-core\gather\connections\extension.js
Collecting from lighthouse-core\gather\connections\raw.js
Collecting from lighthouse-core\gather\devtools-log.js
Collecting from lighthouse-core\gather\driver.js
Collecting from lighthouse-core\gather\gather-runner.js
Collecting from lighthouse-core\gather\gatherers\accessibility.js
Collecting from lighthouse-core\gather\gatherers\anchor-elements.js
Collecting from lighthouse-core\gather\gatherers\cache-contents.js
Collecting from lighthouse-core\gather\gatherers\console-messages.js
Collecting from lighthouse-core\gather\gatherers\css-usage.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\appcache.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\doctype.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\domstats.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\optimized-images.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\password-inputs-with-prevented-paste.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\response-compression.js
Collecting from lighthouse-core\gather\gatherers\dobetterweb\tags-blocking-first-paint.js
Collecting from lighthouse-core\gather\gatherers\gatherer.js
Collecting from lighthouse-core\gather\gatherers\html-without-javascript.js
Collecting from lighthouse-core\gather\gatherers\http-redirect.js
Collecting from lighthouse-core\gather\gatherers\image-elements.js
Collecting from lighthouse-core\gather\gatherers\js-usage.js
Collecting from lighthouse-core\gather\gatherers\link-elements.js
Collecting from lighthouse-core\gather\gatherers\meta-elements.js
Collecting from lighthouse-core\gather\gatherers\mixed-content.js
Collecting from lighthouse-core\gather\gatherers\offline.js
Collecting from lighthouse-core\gather\gatherers\runtime-exceptions.js
Collecting from lighthouse-core\gather\gatherers\script-elements.js
Collecting from lighthouse-core\gather\gatherers\seo\embedded-content.js
Collecting from lighthouse-core\gather\gatherers\seo\font-size.js
Collecting from lighthouse-core\gather\gatherers\seo\robots-txt.js
Collecting from lighthouse-core\gather\gatherers\seo\tap-targets.js
Collecting from lighthouse-core\gather\gatherers\service-worker.js
Collecting from lighthouse-core\gather\gatherers\start-url.js
Collecting from lighthouse-core\gather\gatherers\viewport-dimensions.js
Collecting from lighthouse-core\index.js
Collecting from lighthouse-core\lib\arbitrary-equality-map.js
Collecting from lighthouse-core\lib\asset-saver.js
Collecting from lighthouse-core\lib\dependency-graph\base-node.js
Collecting from lighthouse-core\lib\dependency-graph\cpu-node.js
Collecting from lighthouse-core\lib\dependency-graph\network-node.js
Collecting from lighthouse-core\lib\dependency-graph\simulator\connection-pool.js
Collecting from lighthouse-core\lib\dependency-graph\simulator\dns-cache.js
Collecting from lighthouse-core\lib\dependency-graph\simulator\network-analyzer.js
Collecting from lighthouse-core\lib\dependency-graph\simulator\simulator.js
Collecting from lighthouse-core\lib\dependency-graph\simulator\tcp-connection.js
Collecting from lighthouse-core\lib\element.js
Collecting from lighthouse-core\lib\emulation.js
Collecting from lighthouse-core\lib\file-namer.js
Collecting from lighthouse-core\lib\i18n\i18n.js
Collecting from lighthouse-core\lib\i18n\locales.js
Collecting from lighthouse-core\lib\i18n\swap-locale.js
Collecting from lighthouse-core\lib\icons.js
Collecting from lighthouse-core\lib\lantern-trace-saver.js
Collecting from lighthouse-core\lib\lh-error.js
Collecting from lighthouse-core\lib\manifest-parser.js
Collecting from lighthouse-core\lib\minification-estimator.js
Collecting from lighthouse-core\lib\minify-devtoolslog.js
Collecting from lighthouse-core\lib\minify-trace.js
Collecting from lighthouse-core\lib\network-recorder.js
Collecting from lighthouse-core\lib\network-request.js
Collecting from lighthouse-core\lib\page-functions.js
Collecting from lighthouse-core\lib\proto-preprocessor.js
Collecting from lighthouse-core\lib\rect-helpers.js
Collecting from lighthouse-core\lib\sd-validation\helpers\walk-object.js
Collecting from lighthouse-core\lib\sd-validation\json-expander.js
Collecting from lighthouse-core\lib\sd-validation\json-linter.js
Collecting from lighthouse-core\lib\sd-validation\jsonld-keyword-validator.js
Collecting from lighthouse-core\lib\sd-validation\line-number-from-jsonld-path.js
Collecting from lighthouse-core\lib\sd-validation\schema-validator.js
Collecting from lighthouse-core\lib\sd-validation\scripts\download-jsonldcontext.js
Collecting from lighthouse-core\lib\sd-validation\scripts\generate-schema-tree.js
Collecting from lighthouse-core\lib\sd-validation\sd-validation.js
Collecting from lighthouse-core\lib\sentry.js
Collecting from lighthouse-core\lib\stack-collector.js
Collecting from lighthouse-core\lib\stack-packs.js
Collecting from lighthouse-core\lib\statistics.js
Collecting from lighthouse-core\lib\tappable-rects.js
Collecting from lighthouse-core\lib\timing-trace-saver.js
Collecting from lighthouse-core\lib\tracehouse\main-thread-tasks.js
Collecting from lighthouse-core\lib\tracehouse\task-groups.js
Collecting from lighthouse-core\lib\tracehouse\trace-processor.js
Collecting from lighthouse-core\lib\traces\pwmetrics-events.js
Collecting from lighthouse-core\lib\url-shim.js
Collecting from lighthouse-core\report\html\html-report-assets.js
Collecting from lighthouse-core\report\html\renderer\dom.js
Collecting from lighthouse-core\report\html\renderer\logger.js
Collecting from lighthouse-core\report\html\renderer\psi.js
Collecting from lighthouse-core\report\html\renderer\report-ui-features.js
Collecting from lighthouse-core\report\html\renderer\util.js
Collecting from lighthouse-core\report\report-generator.js
Collecting from lighthouse-core\runner.js
Collecting from lighthouse-core\scoring.js
Collecting from lighthouse-core\scripts\benchmark.js
Running ULTRADUMB™ benchmark 10 times...
Result 1: 1220
Result 2: 1240
Result 3: 1234
Result 4: 1238
Result 5: 1254
Result 6: 1268
Result 7: 1072
Result 8: 1198
Result 9: 1174
Result 10: 1184
----------------------------------------
Final result: 1208
Collecting from lighthouse-core\scripts\build-report-for-autodeployment.js
Collecting from lighthouse-core\scripts\cleanup-LHR-for-diff.js
C:\Users\Connor\code\lighthouse\lighthouse-core\scripts\cleanup-LHR-for-diff.js:16
if (!filename) throw new Error('No filename provided.');
               ^

Error: No filename provided.
    at Object.<anonymous> (C:\Users\Connor\code\lighthouse\lighthouse-core\scripts\cleanup-LHR-for-diff.js:16:22)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at collectAllStringsInDir (C:\Users\Connor\code\lighthouse\lighthouse-core\scripts\i18n\collect-strings.js:61:28)
    at collectAllStringsInDir (C:\Users\Connor\code\lighthouse\lighthouse-core\scripts\i18n\collect-strings.js:56:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jul 18, 2019

Oh, I see.

That collect strings script requires every .js file. Even lighthouse-core\scripts\cleanup-LHR-for-diff.js which is meant to run as a script. That script checks the args passed in - the number of which differs on windows? On windows I get:

[ 'C:\\Program Files (x86)\\nodejs\\node.exe',                                                                                                                                        'C:\\Users\\Connor\\code\\lighthouse\\lighthouse-core\\scripts\\i18n\\collect-strings.js' ]

while on Mac I get:

[ '/Users/cjamcl/.nvm/versions/node/v10.14.2/bin/node',
  '/Users/cjamcl/src/lighthouse/lighthouse-core/scripts/cleanup-LHR-for-diff.js',
  './lighthouse-core/test/results/sample_v2.json',
  '--only-remove-timing' ]

@connorjclark
Copy link
Collaborator Author

that seems true, but shouldn't block yarn update:sample-json?

Sorry, I got that file mixed up. ignore that

@connorjclark
Copy link
Collaborator Author

Issue is w/ the ignore path components. Mac properly ignores it during the collecting phase - the output I shared was actually just the script really being run later in the command :)

@exterkamp
Copy link
Member

Good fix. Ran into this too. collect-strings kept running Ultradumb benchmark and I was super confused. That PR works on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants