Landed Two PR's, And Made A New Friend - Part 1

I Love Firefox DevTools
Should I Say More?
A couple weeks ago, I did the unthinkable...Ok, not really.

As a new contributor to Open Source projects,  I had the opportunity to dive in and look for projects to work on.  If you take a look at my last post, you'll notice that it isn't easy to find a welcoming community for newcomers due to the sheer fact that everyone working on a project is super busy!  However, when you do find a community that wants to see you do well and succeed, it is a blessing.

First and foremost, let's take a look at my two PR's.  A link to both is below (both are in DevTools):

https://github.com/devtools-html/debugger.html/pull/4230
https://bugzilla.mozilla.org/show_bug.cgi?id=1402387  

Now, I'm not going to say that I learned so much that I am now the greatest developer in the world (by all means I have a lot to learn), but this process was very inviting and I am intrigued to do more and more work for the team.  I'm all about adding value and putting myself in challenging situations.  Of the two PR's, I was most interested in the first because I had the opportunity to work with more code and see more of the project, but I'll get to that.

For the bug I found through Bugs Ahoy!, this was a relatively easy fix. I had to simply camel case files and ensure that I didn't break anything.  It wasn't very hard, but I learned something new from it.  Having to work with the Firefox Nightly build, I had to utilize a lot of the same commands in order to run and build my changes.  At first, the changes I made would not be reflected because I was also changing the
moz.build
file, which changed the overall source.  After scratching my head a few times wondering why my
mach build
and
mach run
commands weren't working properly when I would test.  I took to the Slack channel to ask a few questions, and was taught immediately about how to solve such a simple issue.  Before building, you need to clobber your files and then build.  Essentially, what was happening was that the entire build directory, including the checked out source and object directory, was deleted and therefore would not work properly.  So, I entered
mach clobber
and when that finished, I then entered
mach build
only to sit through an entire 40 minutes of having the project build again.

That was my fault.  When I built the Nightly build the first time, I didn't build it in Artifact Mode - meaning that it had to recompile and build all C++ components locally.  However, there is a solution and it is easy to make the change.  Here's the link:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds



Basically, by changing to Artifact Mode, my machine

After everything worked out, I had to create a
.patch
file for testing upstream through continuous integration (CI).  It's pretty close to how you would commit projects with Git, except we're using Mercurial instead.  You can find out more about how to create patches in the following link:

http://docs.firefox-dev.tools/contributing/making-prs.html

It's a great document and I would bookmark it if you're new to contributing like me.  My reviewer, Patrick Brosset, made a small change to reflect how the class was named, and after that everything passed nice and clean.  The patch was landed shortly after that.

Overall, this process was straight-forward and Patrick was also really friendly throughout the whole thing.  I asked him a few questions via the Slack channel and he gave me some pointers about how to traverse through my interests and where to start, which I'm grateful for.

Now, for Part 2...which you can find out about in my next post :)

Check it out below:

http://mylyfeincode.blogspot.ca/2017/10/landed-two-prs-and-made-new-friend-part_11.html

Comments

Popular Posts