Skip to content

Instantly share code, notes, and snippets.

@trevorsibanda
Last active August 29, 2017 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorsibanda/f7b152c068fb748a4c679897c7212421 to your computer and use it in GitHub Desktop.
Save trevorsibanda/f7b152c068fb748a4c679897c7212421 to your computer and use it in GitHub Desktop.
Google Summer of Code 2017 Report

Google Summer of Code

Google Summer of Code 2017

SLICK bug and feature hunt

Scala-Lang Project SLICK Bug and feature hunt
Organization Scala
Repositories https://github.com/slick/slick.git
Mentor Jan Christopher Vogt
Student Trevor Sibanda

Introduction

There are lots of open tickets in the Slick issue tracker and several feature requests which have been upvoted by the community. This project involved actively tackling as many of them as time permits.

https://github.com/slick/slick/issues

Notable Accomplishments

  • Fixed several bugs from the SLICK issue tracker
  • Authored release version 3.2.1 of SLICK
  • Added support for default expressions
  • Added safe methods for creating and dropping schemas

Challenges

  • Both nested tuple and HLists solutions to handling tables with more than 22 columns significantly reduce compilation times. The nested tuple implementation provides quicker compilation times in all cases. The current fix is using tuples for tables with less than 484 columns(nesting depth of 2) and HLists for greater than 484 columns. This solution is not perfect and with more insight can be improved to handle larger table sizes.
  • Two problems in the query compiler and DB2 transaction handling were discovered in adding support for running the codegenerator against all databases. A new entry in the issue tracker was opened and once resolved will allow DB2 codegen tests.
  • Adding test cases for >484 columns resulted in slow compilation times and caused the continuous integration tests to timeout.

Progress

List of pull requests and commits:

  • #1754 Backport #1745 to 3.2
  • #1762 regression: final actually breaks compilation
  • #1581 Fix sqlite issue 1580
  • #1570 Run codegenerator against all databases
  • #1584 Fix mysql parse default b'0'
  • #1735 MySQL SMALLINT should map to scala Int
  • #1727 Automate the publishing of docs from tag releases
  • #1722 SQLite assume TEXT as datatype if not provided
  • #0038 Release 3.2.1
  • #0037 Add new contributor
  • #1533 Add support for default expressions
  • #1704 Add schema feature createIfNotExists and dropIfExists
  • #1546 Generate case classes for >22 column tables using tuples and HLists

*** The marked milestones link to the corresponding merged Pull Requests which contain further information. Unmarked entries point to pull requests which were pending review at the time of submitting this report (29 August 2017) *

Way forward

The time participarting in GSoc afforded me the opportunity to learn more about compiler design and principles and to venture into the SLICK query compiler. A great deal of time was spent reading on compiler design and followed along the MIT Compiler design class and am currently working on a compiler for the COOL programming language. I also discovered some interesting open source projects which I am now contributing to.

I have been contributing to the Slick community before Google Summer of Code and I intend to continue delving into the query compiler, fixing bugs and adding new features.

Best part ?

Getting to release version 3.2.1 of Slick and adding my first compiler phase made it all worth it :) And great mentors and community who helped in many ways! Thanks to @cvogt, @szeiger, @lastland and everyone on the Gitter channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment