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.

Showing Posts 1 to 10

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

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews