Skip to content

Latest commit

 

History

History
138 lines (121 loc) · 4.79 KB

Utkarsh1308.md

File metadata and controls

138 lines (121 loc) · 4.79 KB
categories date student organisation organisation_link project project_link tarball sha256sum mentors phase bio social email blog activity
GSoC
2019
StatusReport
2019-08-25
Utkarsh Sharma
coala
Improve Diff Handling
b9bd88b4f76c89fed8809c29f1733dd458a3fe5df12a4d024899b5d1e69883fa
[John Vandenberg](https://github.com/jayvdb)
I'm a fourth year student (expected graduation date: May 2021) at Birla Institute of Technology and Science, Goa. I participated in GSoC and worked with [coala](http://coala.io) on improving Diff Handling, by improving the context for the affected code shown by diffs, and added support for non utf-8 encodings in coala. I also added support for Binary Diffs and XML Diffs.
GitHub
username
Utkarsh1308
GitLab
username
Utkarsh1308
Gitter
username
Utkarsh1308
LinkedIn
0
repo
cEPs
details
cEP-0034: Improve Diff Handling
2
repo
multidiff
details
Add width and bytes attribute
4
repo
coala-utils
details
FileUtils.py: Fix detect_encoding
5
repo
coala-utils
details
Add support for non utf-8 encodings
6
repo
coala
details
ConsoleInteraction.py: Show context for diffs
7
repo
coala
details
ConsoleInteraction.py: Add parents to syntax tree
8
repo
coala
details
Add support for non utf-8 encodings
9
repo
coala
details
Add support for binary diffs
10
repo
coala
details
Add support for xml diffs

Improve Diff Handling

Work Done

  1. Writing tests for non utf-8 encodings in both coala and coala-utils. and adding support for non utf-8 encodings to coala.

  2. Improvements to the diff contexts shown by coala by showing lines before and after the affected code and showing the parents (class/function).

  3. Add Support for Showing diffs for binary files. Tested with ImageCompressionBear.

  4. Support for xml diffs. Tested with XMLBear.

Challenges

Adding support for binary and xml diffs was quite complex which I was not prepared for beforehand. So I had to come up with designs for these new types of diffs and how to print them with coala. This required finding the right libraries for generating diffs for binary and xml files and using them in coala.

I learned many new concepts along the way. My mentor guided me whenever I got stuck at a problem and was really influential in the work I have done these three months.

Work to be done

The binary and xml diffs have a lot of scope for further improvement.

  1. We can show stats for binary diffs. So the diffs will show the additions and deletions in the diff and only print the binary diff when ShowAppliedPatches is called.

  2. XML Diffs need to be tested with bears which change data so they could be viewed in all their glory. Some new bears for XML can be written which can cause changes in xml documents.

  3. Writing tests for the new binary and xml diffs.