Closed roryabraham closed 1 month ago
Triggered auto assignment to @puneetlath (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.
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.
Report
and Policy
)CONST
and ONYXKEYS
)We can use deprank
to determine the number of dependencies and dependents on a file-by-file basis.
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 https://expensify.slack.com/archives/C04878MDF34/p1684525456740769
@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
- Proposal: We will review the proposal published in March by Fabio and other proposals and comments from contributors to gather the most relevant information and update the proposal and plan in cooperation with SWM
and Software Mansion is saying they're already in touch with CallStack
This is our proposal on how to tackle migration, and we are already in touch with Callstack to compile a common one
@neil-marcellini do you know if we have access to the collaboration channel between CallStack and Software Mansion?
I have no idea how they're communicating with each other, but I think we should have access to their communication channel.
Also, just curious. Why have we decided to use two agencies for the this migration project instead of just one?
I just realized we forgot to consider the migration of expensify-commons
in this diagram
react-native-onyx
has a dependency for expensify-commons
so I think we have to migrate this repo first
I don't think there were any plans to migrate expensify-common, because:
Anyways, TypeScript can import and use JS-only libs, so we definitely don't have to migrate expensify-common to TypeScript before react-native-onyx or E/App
ah we're just using two Str methods inside react-native-onyx
we can even remove them and expensify-common
dependency during the migration from onyx
we're also using only Str
util class and ExpensiMark
in App. we can definitely remove expensify-common
them down the line from App, too.
there might be extra setup necessary to use a library that doesn't have a type declarations though. I guess vendors will gonna figure out that one for us (but it might be just simpler to copy Str
and ExpensiMark
out of expensify-common
to App
although this might be a little bit of scope cleep).
Also, just curious. Why have we decided to use two agencies for the this migration project instead of just one?
Because we are closely working with both of them and they both have lots of experience and this project has quite a bit of config/ setup decisions made so its ideal if they can both (ideally also Margelo will review the plan) with agree on the next steps. Everyone will be happy with the set up in future ad they can have their say now.
@aleqsio presented a list of suggestions on slack on how we type data in Onyx.
I think the second choice there is the best one
keep all top-level keys in Onyx fully optional and handle it gracefully which will be way easier with TS
Fábio (technical lead) from Callstack is working on finalizing the formal proposal and examining the shape of Onyx data.
for setting up the TS tooling for react-native-onyx and writing down the ts guideline, we decided to wait for BĹ‚aĹĽej (technical lead) from SWM. They'll become available on Thursday.
I posted an update in the channel to make it clear that the next step is to finalize the high level of the doc and get it reviewed. I also finally reviewed their proposal document.
I also provided the time estimation for the reviews to take. It usually takes around one week for a review to be completed right?
vendors probably want to know when they can start working so that they can allocate their team members accordingly
waiting for BĹ‚aĹĽej (tech lead from SWM) to review the high level portion of the design doc. Once they think it's fine, we can them it for the internal view.
:wave: Hello Generalist Track Team - you have been assigned to review this High Level Design Doc. Please, treat this as a priority. Review this Stack Overflow for some tips on reviewing a design doc. Once you are done, simply press the Add "Reviewed Doc" comment
button in the right hand side K2 pannel or follow these instructions.
@heyjennahay
(Expensifier / Graduate) - https://github.com/Expensify/App/issues/19971@PauloGasparSv
(Expensifier / Graduate) - https://github.com/Expensify/App/issues/19972@NickTooker
(Project Manager) - https://github.com/Expensify/App/issues/19973@maddylewis
(Project Manager) - https://github.com/Expensify/App/issues/19974@flaviadefaria
(Product Manager) - https://github.com/Expensify/App/issues/19975@twisterdotcom
(Product Manager) - https://github.com/Expensify/App/issues/19976@AndrewGable
(Generalist) - https://github.com/Expensify/App/issues/19977@flodnv
(Generalist) - https://github.com/Expensify/App/issues/19978@MarcFillari
(Accounting Technical Team) - https://github.com/Expensify/App/issues/19979đź”—đź”— đź”— The link for the design doc is here: https://docs.google.com/document/d/1LNcgYeYyovQ88gNjLIgBqBReLtbLAbxeAbna9QKxeAQ/edit#
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
All the required reviews are done for the high level 🎊
Now the next step is:
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I "reviewed" the detailed design (as an author) and left a few comments. I think Hayata will address those and then send the detailed section out as soon as the high level review is complete.
:wave: Hello Generalist Track Team - you have been assigned to review this Detailed Design Doc. Please, treat this as a priority. Review this Stack Overflow for some tips on reviewing a design doc. Once you are done, simply press the Add "Reviewed Doc" comment
button in the right hand side K2 pannel or follow these instructions.
@PauloGasparSv
(Expensifier / Graduate) - https://github.com/Expensify/App/issues/20374@Li357
(Expensifier / Graduate) - https://github.com/Expensify/App/issues/20375@maddylewis
(Project Manager) - https://github.com/Expensify/App/issues/20376@NickTooker
(Project Manager) - https://github.com/Expensify/App/issues/20377@AndrewGable
(Product Manager / Generalist + Engineer) - https://github.com/Expensify/App/issues/20378@flodnv
(Product Manager / Generalist + Engineer) - https://github.com/Expensify/App/issues/20379@johnmlee101
(Product Manager / Generalist + Engineer) - https://github.com/Expensify/App/issues/20380@cead22
(Product Manager / Generalist + Engineer) - https://github.com/Expensify/App/issues/20381@flaviadefaria
(Product Manager / Generalist + Non-Engineer) - https://github.com/Expensify/App/issues/20382@twisterdotcom
(Product Manager / Generalist + Non-Engineer) - https://github.com/Expensify/App/issues/20383@isabelastisser
(Product Manager / Generalist + Non-Engineer) - https://github.com/Expensify/App/issues/20384@danielrvidal
(Product Manager / Generalist + Non-Engineer) - https://github.com/Expensify/App/issues/20385I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
I have read and reviewed this Design Doc!
Is this a super high priority? It looks like it was created with a Daily tag for everyone to review in one day, which normally we reserve for things that are impacting the next couple waves. So I just wanted to make sure this applies to this too as the urgency in the doc talks about no timeline.
I have read and reviewed this Design Doc!
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
strategy@expensify.com
and paste in the Proposalstrategy@expensify.com
(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.stategy@expensify.com
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 issuestrategy@expensify.com
one last time to let them know the Design Doc is moving into the implementation phasestrategy@expensify.com
once everything has been implemented and do a Project Wrap-Up retrospective that provides: