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
{{ message }}
Repository navigation
[Due for payment 2025-08-15] Fix/rebuild unused style searcher #63192
was broken by a prettier change that updated formatting without changing any style usages
looks like it has some false positives (saying things are unused when they're not) as well as false negatives (missing some styles that are actually unused)
has some kind of memory leak and sometimes crashes
So as discussed in slack we are going to disable the check for now.
The scope of work in this issue is to fix the problems with the script and add it back (ideally in its own workflow, separate from prettier).
My suggestion is to drop the regex-based approach, and instead use the ts compiler API as described in this comment.
I made great progress and found 86 unused styles. I tested adding one to a component, and the script removed it from the unused list. I will be doing more tests and cleaning up the code a bit.
Looks like it's been fixed. It was passing on main when I merged the PR to enable it but I guess there was another PR that removed a style usage without removing the style that was merged afterward. Things should stabilize now, but just like any other static check like lint or TS the only way to avoid that completely is to require PRs to be up-to-date with main before merging them, which we don't want to do
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
roryabraham commentedon Jun 6, 2025
@gedu any thoughts on when you'll prioritize this?
roryabraham commentedon Jun 17, 2025
@gedu bump - any update?
gedu commentedon Jun 18, 2025
Hey, sorry for the delay, now I’m OOO, and had look into other issues, I will try soon
gedu commentedon Jun 30, 2025
I'm slowly starting to look into this.
gedu commentedon Jul 2, 2025
I created a TS file getting all the styles first
gedu commentedon Jul 4, 2025
I'm close to have a working solution, fixing some corner cases, I will be off Mon and Tue, I will continue on Wed hope I can create a PR soon
gedu commentedon Jul 10, 2025
I made great progress and found 86 unused styles. I tested adding one to a component, and the script removed it from the unused list. I will be doing more tests and cleaning up the code a bit.
26 remaining items
roryabraham commentedon Aug 5, 2025
Opened #67826 to fix this
[-][Due for payment 2025-07-28] Fix/rebuild unused style searcher[/-][+]Fix/rebuild unused style searcher[/+]roryabraham commentedon Aug 5, 2025
No payments will be due
roryabraham commentedon Aug 5, 2025
That PR is merged and I confirmed it worked, so I think we can close this as it takes effect immediately.
martasudol commentedon Aug 6, 2025
@roryabraham I believe this PR caused issue with failed unused style searcher here: https://github.com/Expensify/App/actions/runs/16769775901/job/47482089487?pr=67065
roryabraham commentedon Aug 6, 2025
Looks like it's been fixed. It was passing on main when I merged the PR to enable it but I guess there was another PR that removed a style usage without removing the style that was merged afterward. Things should stabilize now, but just like any other static check like lint or TS the only way to avoid that completely is to require PRs to be up-to-date with main before merging them, which we don't want to do
[-]Fix/rebuild unused style searcher[/-][+][Due for payment 2025-08-15] Fix/rebuild unused style searcher[/+]melvin-bot commentedon Aug 8, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-08-15. 🎊
For reference, here are some details about the assignees on this issue: