github.com/sgepigon/piggy ↗

Test for spec compatibility and breaking changes.

An animated visualization of sgepigon/piggy's Git history from August 2018 to November 2019, built by 1 contributor. The codebase reached 113 lines, mostly Clojure. The video runs 29 seconds.

Render your own repo

Turn any GitHub repository into a video like this — free sample in seconds.

Visualize your own →

Open this visualization on its own page →

Language

Clojure

Contributors

1

Lines of Code

113

From

2018-08-01

To

2019-11-25

Advertisement

About sgepigon/piggy

Piggy is a Clojure library for detecting breaking changes in clojure.spec specifications. It provides compatibility testing tools that help developers understand when spec updates introduce incompatibilities, such as weakening promises about return types or strengthening requirements on arguments.

The library introduces two main spec combinators: `compat` for comparing simple specs and predicates, and `fcompat` for comparing function specifications. These work alongside standard clojure.spec functions like `conform`, `unform`, `explain`, and `gen`, allowing developers to test whether modifications to specs maintain backward compatibility. The library is designed around property-based and generative testing approaches to catch spec incompatibilities programmatically.

The project emerged during the alpha period of clojure.spec and serves developers who need to evolve their API contracts safely, particularly when dealing with complex functions like variadic operations or polymorphic number handling. It addresses real-world scenarios where changing from basic specs to more flexible ones can inadvertently break compatibility guarantees.

Advertisement

Share this video