Page MenuHomePhabricator

Use strict types everywhere in Wikibase
Open, LowPublic

Description

Estimation of completion (note: requires Bash, not Zsh or other sh):

done=$(grep --exclude-dir={vendor,node_modules,.idea,.phan} --include=\*.php -rwl . -e strict_types | wc -l) &&
todo=$(grep --exclude-dir={vendor,node_modules,.idea,.phan} --include=\*.php -rwl . -e . | wc -l) &&
percent=$(bc <<< "scale=5; 100 * $done / $todo") &&
head=$(git -c core.abbrev=10 rev-parse --short HEAD) &&
LC_ALL=C printf '* %(%d %B %Y)T (%s) = %d/%d = %1.2f%%\n' -1 "$head" "$done" "$todo" "$percent"

Event Timeline

Addshore created this task.Apr 29 2020, 9:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 29 2020, 9:40 AM
Addshore updated the task description. (Show Details)Apr 29 2020, 9:41 AM

Change 592297 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Add ADR for rollout of declare( strict_types = 1 );

https://gerrit.wikimedia.org/r/592297

Restricted Application added a project: User-Addshore. · View Herald TranscriptApr 29 2020, 9:48 AM
Addshore triaged this task as Low priority.Apr 29 2020, 9:48 AM

On the campsite for the ADR review period.

hoo renamed this task from Use strict types everywhere in WIkibase to Use strict types everywhere in Wikibase.Apr 30 2020, 11:23 PM
Addshore removed Addshore as the assignee of this task.May 6 2020, 2:48 PM
Addshore moved this task from Incoming to Blocked / Waiting / External on the Wikidata-Campsite board.

Change 592297 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add ADR for rollout of declare( strict_types = 1 );

https://gerrit.wikimedia.org/r/592297

Addshore updated the task description. (Show Details)May 7 2020, 8:15 AM
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)Jun 16 2020, 10:53 PM
Lucas_Werkmeister_WMDE updated the task description. (Show Details)EditedJul 15 2020, 4:38 PM

I updated the shell script in the task description to directly print a new line for the estimation list, but didn’t change the “todo” and “done” commands. But doesn’t this underestimate the real progress if the “done” command excludes several directories, but the “todo” command doesn’t?

Edit: after rm -rf vendor/, I get instead:

  • 15 July 2020 = 151/1744 = 8.00%

Updated the script and the outputs so that “todo” and “done” both consider the same set of files. (I wasn’t able to find a commit where we had two strict_types declarations – we went from one in aca4c86cbe to five in 7eebaa5e52 as far as I can tell – but for the other days, the number of done files matched up.)

Michael updated the task description. (Show Details)Aug 19 2020, 2:06 PM
Michael added a subscriber: Michael.
Addshore updated the task description. (Show Details)Aug 24 2020, 12:41 PM