YS and CircleCI

Calva External link is an integrated development environment for enjoyable and productive Clojure External link and ClojureScript External link programming in Visual Studio Code External link .

Calva uses CircleCI External link for continuous integration and deployment. CircleCI requires a .circleci/config.yml file to define the build and deployment steps.

YS ❤ Calva

Nearly all of the YS Project's External link code was written using Calva. It's by far the best way to develop software with Clojure.

Calva's config.yml file had grown to be quite large and complex, but after refactoring it to use YS External link , it is now much more maintainable and easier to work with.

What started out as one big 636 line YAML file External link with lots of embedded Bash scripts, was refactored into nearly 40 small files External link each with a clear and specific purpose.

You can see the how the migration was made over 30 single purpose commits in this Pull Request External link .

Now changes are made in a much more maintainable way, and the CircleCI required config.yml file is generated from the YS files using a simple ys command:

$ ys -Y config.ys > config.yml

As a bonus, linting was performed on the Bash scripts (now in their own files) and several small issues were found and fixed.


This technique is a general strategy for refactoring large YAML files into smaller, more maintainable ones, regardless of whether or not the target system uses YS natively yet.