Exploring New Things
Thanh Van
Posted on February 14, 2022
Welcome to my another blog post. What a wonderful week! New concepts keep coming to my mind. This week I was playing around with Turborepo, helping review PRs, and doing some research about React Native when reviewing.
Turborepo
This week both Francesco and I were working on this PR to get ESLint config used in microservices with Turborepo. In order to avoid duplicating codes, we created a local ESLint configuration package then reuse it for all microservices. I realize that pnpm
allows us to publish all packages at once by pnpm publish -r
, which I have never known before, this is absolutely amazing since we don't have to do this every single time.
React Native
I am wondering what is React Native, and why do we have to use this to make a Telescope application work? Why we don't use ReactJS to do this? A bunch of questions just come to my mind when reviewing this PR, I originally thought we are making Telescope work on mobile, so it might be the reason why we are using React Native.
I also read the codes of Hung to see his changes while adding bottom navigation bar for mobile device. More interesting facts that I get for myself when reading codes and reviewing is that I can know what I have not seen before, some small errors Hung has made that I did not pay attention on before. That is also the reason why a PR needs multiple reviewers. Seems like we are exploring things, so we were suggested to use pure JavaScript instead of Typescript.
Code Reviews
I remember one of our sheriff said: "If you are not doing codes, so help others review codes, at least you are doing something and better than nothing". I don't know how about others' thought, but this inspires me a lot.
I see PR #2863 is adding Github token into all env files. Since we just added auth: process.env.GITHUB_TOKEN
when adding octokitjs to Telescope, which will use GITHUB_TOKEN
variable whenever it is available, so we want to populate this token automatically. But I am wondering that how can we know the value of GITHUB_TOKEN
.
Even though Andew is not in OSD700 anymore, he still contributes regularly to Telescope, and I just want to show my supports for him by helping him review codes. I have seen the amount of his works: PR #2840, PR #2789. He is also the one inspires me in learning new things.
Docusaurus
Last semester, I contributed to Intro2C, which is a course notes for IPC144, and used Docusaurus to setup. So when I see Docusaurus again in Telescope, I want to take part of it. I found this issue is the only one has no assignees, so I took this one and do something with Docusaurus. After a few hours reading all the documents again, I came up with a PR, which was about using Admonitions in the documents. I can't wait to see Docusaurus in v2.7.0
, this is much easier to find the documents in the future.
Difficulty
When I create a PR, it conflicts with the changes that already merged to master
branch, and I have to solve all the conflicts in order to get mine merged. However, when I solve the conflicts on Github page, Commit merge is the only option for me to choose, I click on that and I see this message I am super nervous when seeing master
is merge into my issue, but I see this issue happens one time previously, I don't remember exactly who had the same issue with me, but it was resolved successfully at the end.
The only thing I can do to resolve this is to reset my current PR, then rebase, and push it again. I will leave what I did to resolve this here, in case when I have the same issue again, I would know what to do
git checkout -B <my-issue-name> <the `sha` of commit>
git checkout master
git pull origin master
git checkout <my-issue-name>
git rebase master
git push origin <my-issue-name>-f
I had the same problem when trying to reset my PR in last semester, I try the way that David showed me, but I used the wrong sha
, so I could not reset it at that moment.
Posted on February 14, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 21, 2024