/watversion

Minimal example project for showing problem with dialyzing Version.parse call

Primary LanguageElixir

Watversion

Build Status

Output from dialyzer run:

$ mix dialyzer
Compiling 1 file (.ex)
Finding suitable PLTs
Checking PLT...
[:compiler, :crypto, :dialyxir, :dialyzer, :elixir, :erlex, :hipe, :kernel, :logger, :mix, :stdlib, :wx]
PLT is up to date!
Starting Dialyzer
[
  check_plt: false,
  init_plt: '/Users/zoldar/Work/hammer/watversion/_build/dev/dialyxir_erlang-21.0.8_elixir-1.7.3_deps-dev.plt',
  files_rec: ['/Users/zoldar/Work/hammer/watversion/_build/dev/lib/watversion/ebin'],
  warnings: [:unknown]
]
Total errors: 1, Skipped: 0
done in 0m2.76s
lib/watversion.ex:17:pattern_match
The pattern
{:ok, _whatever}

can never match the type
:error
________________________________________________________________________________
done (warnings were emitted)

Installation

If available in Hex, the package can be installed by adding watversion to your list of dependencies in mix.exs:

def deps do
  [
    {:watversion, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/watversion.