-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement TypeScript in New Expensify #16665
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Here's a high-level overview of what I'm imagining for the rollout plan: flowchart LR
A(Setup TypeScript for E/App source code)
X(Setup TypeScript for GitHub Actions)
Y(Setup TypeScript for Jest)
B(Laying Foundation)
C(Materials and Plumbing)
D(Construction)
E(Finishings)
F(Implement TypeScript in GitHub Actions)
G(Implement TypeScript for Jest tests)
subgraph Main App
A --> B --> C --> D --> E
end
subgraph GitHub Actions
direction LR
X --> F
end
subgraph Jest
Y ----> G
C --> G
end
H(Setup TypeScript in react-native-onyx)
I(Implement TypeScript in react-native-onyx)
subgraph react-native-onyx
direction LR
H --> I
end
Most of this is pretty self-explanatory, but I'll go into some extra detail for the rollout plan for the main source code.
We can use |
Posted a second predesign here yesterday |
Started working on a doc here: https://docs.google.com/document/d/1LNcgYeYyovQ88gNjLIgBqBReLtbLAbxeAbna9QKxeAQ/edit# |
I'm going to help Rory with this by asking external agencies to collaborate on a pre-design / writing the doc, and then making sure the process is going well. |
I didn't get to this today. |
I posted to the Callstack and Software Mansion Slack channels asking for proposals on how they would plan and implement this project. https://expensify.slack.com/archives/C03UK30EA1Z/p1684525440666989 |
@neil-marcellini, @roryabraham Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I got a reply from Callstack and SWM wants a day or two to post something. |
I created #typescript-new-expensify and invited CK and SWM. @hayata-suenaga is helping out now too! I still need to read through the proposal that software mansion already wrote, and then Iβll let them know that weβre waiting for their joint proposal and ask on an ETA for that. Maybe Hayata could tackle that? |
@neil-marcellini thank you for adding me to this issue I thought you asked for proposals separately from Software Mansion and CallStack. Do they know they have to produce a joint proposal? |
okay CallStack is willing to collaborate
|
and Software Mansion is saying they're already in touch with CallStack
|
I went ahead and emailed out the project wrap-up. The last things couple items are still lingering, but 99.9% of this project is done |
One of the last two wrap-up issues was rejected by maintainer so we closed the issue as not planned. That leaves only #43055 |
Another Post-migration weekly update on the Slack channel! |
We're incredibly close to finishing this for good, not overdue! |
Head's up, I'll be working 50% for the rest of this week and next π² |
@ShridharGoel reports that the last PR to close this out will be ready for review in the next couple days |
Another Post-migration weekly update on the Slack channel! |
Just merged Expensify/eslint-config-expensify#114 earlier today |
Apparently some delays for personal reasons on the part of contributor for the last PR. hopefully we can close this out by EOW π€πΌ |
Still waiting on that last one. |
Another Post-migration weekly update on the Slack channel! |
Here's the latest update. @roryabraham it seems like it's going to take quite a while before withOnyx is deprecated. Can we sent the project wrap up sooner? |
I already sent the project-wrap up for this project. The only thing left in this project is #43055 |
I can track the official close of the project in https://github.com/Expensify/Expensify/issues/413336. We can close this issue. Thanks so much everyone for all your hard work and consistent communication. This was a huge project, and it's already hard to remember what it was like before we used TypeScript. Huge thanks in particular to @fabioh8010 and @blazejkustra, who were the real champions of this project. |
Proposal: Utilize TypeScript to reduce bugs in NewDot
π Link to the design doc
docs.google.com/document/d/1LNcgYeYyovQ88gNjLIgBqBReLtbLAbxeAbna9QKxeAQ/edit#
ποΈ Other links
Strategy
Our strategic roadmap for the next couple years is Reunification β moving all of our existing users from OldDot to NewDot, and itβs going to look like a completely new product. During this transition period, thereβs an increased risk for churn, and stability of the platform is more important than ever. Any lines of defense between our customers and bad code will pay dividends during any tumultuous times to come.
Problem
JavaScript has been very popular for front-end development for a long time, and over the years it has evolved with new developer-friendly features that make it easier to GSD. Overall, itβs pretty great. However, it is still plagued by one fundamental problem: runtime errors stemming from incorrect types. This common class of problem leads to bugs, ranging in severity from showing weird things on the screen to crashing the whole app.
While there are many bugs that can be caused by incorrect types, the most common example of a runtime type safety error is
Cannot access property X of undefined
. A quick GitHub search reveals that over the last couple years we have introduced hundreds of this type of bug into the NewDot codebase, each of them stemming from this same root cause β attempting to access a property on a variable whose value isundefined
. When this occurs, the app crashes.Solution
Let's commit to adopting TypeScript in New Expensify, an awesome superset of JavaScript that gives us the benefits of using a compiled language like C++! That way, type errors can be caught at compile-time instead of run-time, and a whole class of common bugs will be eliminated from our product. #BugZero here we come.
Furthermore, letβs engage the near-limitless capacity of our open-source community to do it in parallel to our existing roadmap, without pausing any other feature development in the meantime.
Tasks
#expensify-open-source
[email protected]
and paste in the Proposal[email protected]
(continue the same email chain as before) with the link to your Design Doc#expensify-open-source
to discuss any necessary details in public before filling out the High-level of proposed solution section.[email protected]
again with links to the doc and pre-design conversation in SlackDesignDocReview
label to get the High-level of proposed solution section reviewed#expensify-open-source
to ask for engineering feedback on the technical solution.DesignDocReview
label to this issue[email protected]
one last time to let them know the Design Doc is moving into the implementation phase[email protected]
once everything has been implemented and do a Project Wrap-Up retrospective that provides:The text was updated successfully, but these errors were encountered: