4

I am setting up Heroku CI with Elixir Phoenix buildpack. I want to start using Dialyzer.

Diazlyer is a static analysis tool that before the first run takes at least a couple of minutes to create a "persistent lookup table" (PLT) of types from Erlang, Elixir and project dependencies. Later, project analysis is much quicker. I want to cache the PLT.

I've found this section on caching during build: https://devcenter.heroku.com/articles/buildpack-api#caching but I can't find anything about caching in test-setup or test script.

Is there test/CI cache or is it only usable in buildpacks?

tkowal
  • 8,659
  • 1
  • 20
  • 42

1 Answers1

2

(Tomasz, I know that you already have found a path how to approach this problem, but I will share here publicly what I have shared with you privately so that others might also benefit.)

Is there test/CI cache or is it only usable in buildpacks?

Seems that in test/CI you can not do it, you have to use a buildpack. Or maybe hold the cache somewhere outside of Heroku (seems like not a good way to me though).

Have you seen this https://github.com/tsloughter/heroku-buildpack-erlang-dialyzer? It seems dated but maybe it has some hint that can be useful to you.

Setting up backpacks is rather straight forward and for your need this seems the only option that would support caching.

Szymon Jeż
  • 7,659
  • 4
  • 38
  • 58
  • 1
    That info was helpful, I managed to cache PLT file in the `test-compile` phase of buildpack and us it in `test` phase. https://github.com/socialpaymentsbv/heroku-buildpack-dialyxir – tkowal Sep 03 '19 at 08:44