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
Add virtual files and refactor snap fetching #1019
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1019 +/- ##
==========================================
+ Coverage 93.02% 93.33% +0.30%
==========================================
Files 96 95 -1
Lines 9690 9914 +224
Branches 909 935 +26
==========================================
+ Hits 9014 9253 +239
+ Misses 676 661 -15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hey @ritave! I want to dabble into reviewing this but don't have too much time to really meaningfully dig deep into this. Can you enlighten me on a few questions that I have?
|
Hell @kenhkan! I'm happy you want to help out with reviewing code! 1)I suggest you start by reading code comments - a lot of time has been spent making sure all non-obvious architecture decisions are explained inside the code itself right near the location in which the unusual decision has been taken, along with extensive TSDoc documentation for all the exposed APIs which we write for any changes. If you find anything confusing after that, you'll find further multiple and rather exhaustive elaborations in review comments. While reading code you'll probably notice that the main architecture change is a simple Dependency Injection along with Factory pattern that are taught in the first/second year of university and should be instantly recognisable to any developer. If you have any further questions after reading all of the explanations already written, please do post them - I'm happy to elaborate since that'll help me understand which things that might seem obvious to me, might not be obvious to you, so that I can learn what should I focus on next time. 2)As you probably know, due your to experience of being an engineer, smaller PRs are started being reviewed earlier, more enjoyable to the reviewers, reviewed quicker, merged sooner and receive more useful scrutiny. And this user story has outgrown the scope of what I would consider a sensibly-sized PR. Additionally having separate PRs allows us to discuss decoupled technical decisions on their own merits, and influence further work done. AdnotationsI'm happy to provide even more documentation to non-engineer stakeholders so that they can verify, measure and understand the work being done, though since MetaMask engineers conduct work publicly in an open-source projects with a _very_ high visibility to the public, may I suggest such documentation be discussed in other venues rather than public repositories, which are geared towards external people, specifically engineers reading the code. MetaMask is built by people who are strongly driven by the mission and runs on trust, trust extended to our colleagues, trust given to us by the community, and finally, trust to do the right thing out of own volition. |
b941589
to
1b6976c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just some minor comments.
`../../../test/fixtures/metamask-template-snap-${templateSnapVersion}.tgz`, | ||
), | ||
), | ||
}) as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this assertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've internally decided to leave In the future, if time allows, we could research moving to generics instead. |
453e2f4
to
f61e195
Compare
6912086
to
5ef0e97
Compare
I require file metadata be attached to them for #847.
This PR adds:
fetchSnaps
function, and inject a mock instead.closes #1005