DEV Community

Roman Rezinkin
Roman Rezinkin

Posted on

DPS909 - Lab 2 Blog

For this week in Open Source Development, our task was to fork another students static site generator. In my case, I opted to try a new language, which was RUST.

The first order of business was creating an issue, so that the owner of the rssg repository understood what I was about to do, and why. Here is the link to the issue: Link

After forking the repository (Link), I began my journey of implementing the ability for the SSG to recognize .md files, read them, look for special Markdown syntax and replicate it into a .html file.

My first objective was to quickly learn RUST. I followed the README with the forked repository, and was able to quickly and efficiently setup RUST on my personal computer. After some google searching, I quickly began to see the syntax of RUST, and how it operates.

So now that I have a rudimentary understanding of Rust, I began implementing my features. My first step was to look over how the owner of the repository structured their code. Luckily, Antonio Bennet, made many comments that made the process of understanding their code much simpler. I was able to quickly determine where I had to make some slight changes, in order to implement .md support.

After making some changes within the code, I was able to get the code to fully function. At this point, I already have implemented the ability for the code to detect the addition .md file format, and I also changed the code to allow the ability to detect the Header 1 Markdown Syntax (#).

I then made a PR for Antonio to review. This is where some issues became surfacing.
My first PR: Link
My second PR: Link
My third PR: Link
My fourth PR: Link

The basic explanation of why there are four PR's, is because in the first PR, I had some issues that surfaced when changing between WSL and windows. This was fixed in the second PR. After merging the second PR, which included all of my changes, Antonio merged the changes into his repository and then did a git pull. He tried to run it locally, but somehow the code was different... Super weird, so we hopped on a call on Slack, and started investigating. We noticed that the code on my end was somehow not pushed into master. So, I made another PR and fixed the .md file recognition. However, once again, in Antonio's environment, it still did not work. So we continued our discussion and found that once again, git made an error with not pushing my code. This is where the fourth and file PR was created, and after finally we had a working environment, both on Windows and WSL (Unix/Linux).

Throughout this Lab, I gained some new knowledge on RUST, which was exciting, and I noticed how easy string manipulation and CLI creation is within RUST. If I could do one thing differently, it would be to test my changes not just through Windows, but also have some kind of WSL system installed, so that I can see how the code behaves on that operating system.

My repository was worked on Antonio, which could be seen here.
PR: Link
Issue: Link
Antonio made the required lab 2 changes, as well as fixed an issue where my code was having a hard time with recognizing different path creations for different operating systems. Overall, the process went really smooth.

Top comments (0)