Repository navigation
Drop unread fields from the versions reading and other dead code - #6270
Merged
Merged
Conversation
- `pickerModel` (version.js) built `picker.keyTitle`, `picker.ariaLabel`, `picker.compared`, `picker.news`, `latest.keyTitle` and three `selection` fields that nothing reads; the last reader of `latest.keyTitle` went with #6153's `olderVersion()`. The browser type check confirms no reader remains. - `licenseNotices`' `suppliedLicenses` parameter has had no caller passing it since it was added. - A stray `import pytest` at the end of test_render_controls.py, and in test_shown_answers.py a no-op `.replace` and an option appended outside its group instead of through `section`'s `extra`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes code nothing reads, found by the nightly review. No behavior changes.
pickerModelinbrowser/runtime/version.jsbuilt five strings and flags per read that no consumer uses:picker.keyTitle,picker.ariaLabel,picker.compared,picker.news,latest.keyTitle, and thecurrentRevision,pendingBaseandbaseRevisionfields ofselection. The last reader oflatest.keyTitlewent witholderVersion()in Say an older version in the panel field's words, and offer Open latest at its end #6153; the others were already unread. The fields still read (picker.token/offered,latest.failed/error/disabled/label/shown/news,selection.base/on) stay, and the browser type check (pnpm run check:browser) fails on any read of a removed one, so it confirms none remains.licenseNoticesinbuild/browser/shipped.mjstook asuppliedLicensesargument neither caller (build/vendor.mjs,build/browser/build.mjs) has ever passed; a package without a license file still throws.import pytestat the end oftests/browser/test_render_controls.py; intests/model/test_shown_answers.py, a.replacethat replaced a string with itself, and an option appended after its group's closing tag rather than throughsection'sextraparameter, which nothing used.Checked:
pnpm run test:runtime(1001 pass),pnpm run check:browser,pnpm run check:tools, andtests/model/test_shown_answers.pypass.