My GSoC 2018 Experience

Overview

Organization: Haskell.org

Project Title: Add Support For Deprecating Exports

Mentors: Matthew Pickering, Erik de Castro Lopo

My Changes on Phab: https://phabricator.haskell.org/D4953

My GHC Fork: https://github.com/alanasp/ghc-gsoc

My GHC Proposal (motivation and user-manual): https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0028-deprecating-exports-proposal.rst

Over these last few months, I’ve been working on my Google Summer of Code 2018 project for Haskell.org. Here, I am going to briefly describe what it was like being a GSoC student. For technical information, please refer to the links above.


The Journey

The whole GSoC thing initially started out by researching the open-source orgs and Haskell.org seemed like a good fit as I had some Haskell background back from uni and I felt like it would be reasonably straightforward to implement the export deprecation (hint: it wasn’t).

So, when I was happy about getting a summer job, which allows me to go home and see family, I was beginning to take a look at the GHC codebase and it wasn’t making much sense. I asked my mentors and the developer community on the IRC a few questions and got some really great answers as everyone was really helpful. However, I didn’t ask enough and stared at the code for too long. This resulted in my progress during the first work period being mostly limited to a minor warm-up patch, submitted GHC internal proposal and parser modifications to admit the pragma to the syntax tree. This meant that things had to change and progress had to be expedited for the work to be finished.

During the second work period, I drastically changed my approach by asking anything unclear on the IRC almost daily and pretty quickly things took off. I managed to finish the second work period with the basic functionality being in place and the project well on-track for completion. Obviously, the help received on the IRC and from my mentors helped a great deal to get things going but I think there was also a huge “click” factor, exactly as it is stated in the GHC Newcomers Guide:

Don’t get scared. GHC is a big codebase, but it makes sense when you stare at it long enough!

It took me some time but when it started making sense, the coding became easier, faster and much more enjoyable.

In the third and final work period, I was still maintaining regular weekly progress updates with my mentors and interacting with the GHC developers on IRC quite frequently. What changed, was that I was much more confident on where to look things up by myself and that my understanding of how the GHC code is structured went up that I was able to figure out how most basic things stack up. Over this period, I finished up with the proposal functionality, wrote a bunch of test cases and was concerned with getting my revision to pass the Linux Continuous Integration. It seems that I probably should have used the CI in a more continuous way as there was a bit of trouble in figuring out why code works on my machine but not on the server. In the end, the CI passed and the thing that has caused me all this trouble was a bug related to loading the source interface. It probably isn’t very descriptive but it was a rather silly and shameful bug (aren’t they all?) and I won’t go into more detail. With the CI passed, I had to take care of a few more issues and there comes a moment when I’m typing this.


Current Status

The changes that I have implemented are currently being reviewed and it is expected that they will become part of GHC 8.8.1, which should roll-out by the end of this year.


Takeaways

The learning experience in large-scale open source projects is truly unparalleled. Not only do you improve your coding skills but also nail a whole bunch of other technical skills (like Git and Phabricator) and ways to communicate with people scattered in different time-zones around the world without once meeting in person.

I am definitely planning to come back and contribute to GHC some more at some point, hopefully soon, but now off to get some rest and to my final year at uni.