Giter Site home page Giter Site logo

gsoc_2022's Introduction

GSoC 2022 - Report

Author: Mohammad Zain Abbas

Organisation: Homebrew

Project: Autobumping resources in Formulae

Mentors: Nanda H Krishna, Sam Ford, Rui Chen, Mike McQuaid

Project Description

Homebrew has a brew livecheck command which checks upstream sources (webpages, files, repositories) to identify the latest version of software in a Formula or Cask. Many Homebrew packages also contain resources, a special kind of package dependency which is usually not available as a Formula. While Homebrew has tools to automatically upgrade packages to new versions, this feature doesn't work with resources. The main aim of this project was to enhance Homebrew's existing livecheck feature to work for resources as well.

Resources in Formulae need to be bumped manually, i.e, contributors need to spend time in identifying the latest version of the resource as Homebrew doesn't have tooling to automate this process. It was suggested earlier to have livecheck or bump-like tooling to help automate this, as most resource updates have a clear strategy. Something similar exists for many PyPI resources -- the brew update-python-resources command.

The following objectives were defined to be achieved during GSoC:

  • Extend the Livecheck DSL to work for resources
  • Add default strategies meant for resources from specific sources (such as RubyGems, CPAN, etc.)
  • Add livecheck blocks for resources in homebrew/core
  • Augment brew livecheck with a option to retrieve resource versions

Extending the livecheck DSL and augmenting the brew livecheck command to work for resources were the two main goals of this GSoC project. Earlier in the project, a PR to extend the livecheck DSL for resources was merged. Following this, the brew livecheck command was modified to work for resources. This PR was the most important contribution during GSoC and it was merged after a few iterations of feedback to ensure that the feature was implemented correctly.

As a result of this project, the brew livecheck command now retrieves version information for resources as well (for a given Formula). For example,

brew livecheck influxdb --resources

will show the livecheck output for the influxdb Formula and its resources.

Completed Tasks

  • Extended the livecheck DSL to work for resources
  • Augmented brew livecheck with an option to retrieve resource versions
  • Added tests for new changes to brew livecheck command in Homebrew/brew
  • Updated documentation for brew livecheck
  • Added livecheck blocks to resources in a few Homebrew/core Formulae

Ongoing and Future Tasks

  • Add more livecheck blocks to resources in several other Formulae
  • Enhance brew bump to work for resources
  • Add default strategies meant for resources from specific sources (such as RubyGems, CPAN, etc)

Challenges and Takeaways

  • Before GSoC, I had no knowledge of meta-programming in Ruby. Now, I am more comfortable with Ruby, and I have even started to use it for some personal projects.
  • Homebrew has a huge codebase. It was a bit overwhelming for me at first since I had limited Ruby knowledge, but it got easier for me to understand the code once I had grasped Ruby concepts.
  • While I initially struggled to debug code and test out features, I extensively used interactive Ruby (brew irb) to debug and to gain some extra Ruby knowledge.
  • Time management was one of my biggest issues because I was working on other things in addition to this project. I told my mentor in advance about the engagements, which allowed us to plan ahead and accomplish the tasks.
  • Sometimes, getting feedback on PRs took more time than I expected because the changes were large. My main takeaway here was to remain patient and engage in communication with the mentors frequently.
  • Thanks to the mentors' thorough reviews, I have learned a lot during my GSoC period.

Acknowledgements

I would like to thank my mentors for their support during this project, especially my main mentor Nanda H Krishna and co-mentor Sam Ford. They were really comprehensive with their code reviews and guidance. I also appreciated their taking the time to address all of my questions during our weekly meetings.

I would also like to thank GSoC for providing me the opportunity to work with Homebrew. All the maintainers that I got to work with were incredibly helpful. I am glad that I got an opportunity to work closely with them, and I am looking forward to contributing to Homebrew in the future as well.

Pull Requests

Homebrew/brew

GSoC

Releases

Homebrew/homebrew-core

GSoC

Homebrew/homebrew-cask

Pre-GSoC

gsoc_2022's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.