Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dialyzer checking to travis CI runs #357

Merged
merged 6 commits into from
Sep 25, 2018
Merged

Conversation

mmrobins
Copy link
Contributor

I encountered typespec errors with older versions of httpoison and it took
me awhile to figure that out. Great that the typespecs have all been fixed
up in recent versions, but would be good to make that part of CI so it's
easier to spot when there's problems in the future.

@pedep
Copy link
Contributor

pedep commented Sep 25, 2018

Seems like the build fails due to dialyzer taking too long generating the PLTs.

I think we might be better off switching to a docker based CI (travis doesnt seem to have great support), which enables the use of images with PLTs built on. Im personally a big fan of Gitlab CI.

An alternative might be doing like this guy https://github.com/danielberkompas/travis_elixir_plts, but that might end up costing a lot of build time due to the size of the download

Especially important with the addition of typespec checking with
dialyzer, since without caching that will take a few extra minutes each
time.
I encountered typespec errors with older versions of httpoison and it
took me awhile to figure that out.  Great that the typespecs have all
been fixed up in recent versions, but would be good to make that part of
CI so it's easier to spot when there's problems in the future
    warning: the dependency :dialyxir requires Elixir ">= 1.6.0" but you are running on v1.5.3

This is why the travis build got stuck, and why on elixir 1.7 the
formatting check didn't fail.
@mmrobins mmrobins force-pushed the dialyxir branch 2 times, most recently from 14d7b62 to efd8c5d Compare September 25, 2018 21:26
This should only be necessary the first time, after that a cached _build
dir will have most of the necessary PLT built.
@edgurgel
Copy link
Owner

edgurgel commented Sep 25, 2018

I forgot how much it takes to bootstrap dialyzer 🙄

Could we use Travis cache to speed up this process? 🤔

Thank you so much for this work, @mmrobins

@mmrobins
Copy link
Contributor Author

Working on bootstrapping it right now with the travis_wait command. Trick is to just get it cached the first time. That caching should help all the CI runs too for compiling the elixir code. ed450e4

Not much point in running dialyzer and format check in multiple elixir
verisons.  If one fails, that's enough to know what needs to be fixed.
@mmrobins
Copy link
Contributor Author

There we go, now that the PLT is all cached the dialyzer check runs in a few seconds, and with the caching the overall travis build matrix runs faster as well.

@edgurgel
Copy link
Owner

That's great! <3

@edgurgel edgurgel merged commit f0a867c into edgurgel:master Sep 25, 2018
@mmrobins mmrobins deleted the dialyxir branch September 25, 2018 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants