tielur

tielur

I’m getting a few things from my dialyzer output that I’m not sure how I can fix.

:0:unknown_function
Function ExUnit.Assertions.flunk/1 does not exist.
________________________________________________________________________________
:0:unknown_function
Function ExUnit.Callbacks.__merge__/3 does not exist.
________________________________________________________________________________
:0:unknown_function
Function ExUnit.CaseTemplate.__proxy__/2 does not exist.

First 10 of 28 Posts Switch mode

sneako

sneako

I think adding ExUnit to plt_add_apps as described here in the readme GitHub - jeremyjh/dialyxir: Mix tasks to simplify use of Dialyzer in Elixir projects. · GitHub would get rid of the errors, but it is strange that the exunit functions are there to begin with…
Are you using ExUnit in your application code? Or maybe running with MIX_ENV=test?

tielur

tielur OP

Yea I am running this on CI which is using the MIX_ENV=test, is it preferable to be running this on a different environment?

tielur

tielur OP

I’m using:
dialyzer: [plt_add_deps: :transitive]

jeremyjh

jeremyjh

You don’t really want to use transitive - thats just there for backwards compatibility. By default your app_tree is included in your deps, and since 1.4 Elixir has started your deps for you so they are all in your app tree. :ex_unit won’t be added though. If you want to dialyze in MIX_ENV=test you need to either add ignores for those lines, or add ex_unit separately using dialyzer: [plt_add_apps: [:ex_unit]]

tielur

tielur OP

I think I can get CircleCI to run dialyzer with the dev environment so I can skip the whole plt_add_apps or ignore stuff. I’ve also removed the transitive option. I’ll give this a shot. Thanks guys

NobbZ

NobbZ

If Circle runs on linux, it should totally be sufficient to use this line in the script:

MIX_ENV=dev mix dialyzer

Everything else will be run in test, but that line “overrides” the MIX_ENV temporary.

tielur

tielur OP

@NobbZ awesome that worked.

Now I only have one real dialyzer error I need to fix. :tada:

kip

kip

ex_cldr Core Team

I’m stuck on a Dialyzer error (well, to be honest, most errors puzzle me) and could use some help. Here’s the code (the error is on the with line):

  defmacro __before_compile__(env) do
      ...
      for rule_group <- all_rule_sets do
        def unquote(rule_group)(number, locale_name) when is_binary(locale_name) do
          with {:ok, locale} <- unquote(backend).validate_locale(locale_name) do
            unquote(rule_group)(number, locale)
          end
        end
      end
    end
  end

And the error:

lib/number/rbnf/processor.ex:371:pattern_match
The pattern
{:ok, 95}

can never match the type
{:error, {atom(), binary()}}

Note that the function unquote(backend).validate_locale(locale_name) returns either {:ok, locale} or {:error, {exception, reason}}

tielur

tielur OP

Hey @kip, did you ever get this figured out? If not, would it be possible to get a working example of this breaking in a small repo to look at?

kip

kip

ex_cldr Core Team

I didn’t get it worked out and just resorted to silencing the warning with an @dialyzer {:nowarn_function, ...}. I’ll see if I can distill this down to a much minimal reproducible example - it does bug me so some extra eyes would be much appreciated.

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement