marpo60

marpo60

Blend - test your package against different versions of its dependencies

We developed Blend a new hex package that solves the problem of testing your library against different version of its dependencies.

For example, an elixir package that depends on plug_crypto with a requirement of ~> 1.2 or ~> 2.0 , that wants to test against the two major versions, would normally have it’s mix.lock resolved to 2.x .

So there is no straightforward way of running your test locally and in the CI against 1.x and 2.x.

Blend tries to solve this. Inspired in a similar tool that exists in the ruby ecosystem called appraisal

You can create different blends and it will take care of you in generating alternative mix lockfiles and a simple way of running test against them.

Hope you like it!

Most Liked

tiagoefmoraes

tiagoefmoraes

Hey Marcelo, thanks for Blend , it’s awesome.

I just merged Surface’s PR and added it to Surface Catalogue

blend/premix.exs is very powerful, I could make custom modifications that Surface Catalogue needed.

Blend makes working with a local copy of Surface simple (BLEND=local mix ...) and fast because each blend has it’s own deps and _build directories.

marpo60

marpo60

There is a new article showing how to add blend to your existing package.

marpo60

marpo60

Hi Eiji,

For example in Github Actions you can achieve 1 and 2 using the matrix feature with blend.

We have been using blend in candlex for testing against different version of nx (0.6 and 0.7 in this case)

Initial implementation and follow up

At the end of the day it would look like this in your CI workflow

      matrix:
         include:
           - elixir_version: 1.16.0
             otp_version: '26.2.1'
             lint: true
           - elixir_version: 1.15.7
             otp_version: '25.3.2.8'
           - elixir_version: 1.15.7
             otp_version: '25.3.2.8'
             blend: "nx06"

You can take a look at the full CI workflow here

Where Next?

Popular in Announcing Top

zorbash
I created Kitto a framework for dashboards inspired by Dashing. The distributed characteristics of Elixir and the low memory footprint...
New
Crowdhailer
Raxx is an alternative to Plug and is inspired by projects such as Rack(Ruby) and Ring(Clojure). 1.0-rc.1 is now available. To use it re...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
fuelen
Hey folks! Want to present a toolkit for writing command-line user interfaces. It provides a convenient interface for colorizing text...
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 10719 134
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement