hez
With this code under OTP 27 dialyzer ran cleanly:
defmodule Test do
@base_uribase_uri URI.new!(“`https://google.ca`”)
def our_base do
@base_uri |> URI.append_path(“/foo”)
end
end
But in OTP 28 we are getting the following error:
> mix dialyzer
…
---
lib/app/test.ex:5:call_without_opaque
Function call without opaqueness type mismatch.
Call does not have expected term of type %URI{
:authority => URI.authority(),
:fragment => nil | binary(),
:host => nil | binary(),
:path => nil | binary(),
:port => nil | char(),
:query => nil | binary(),
:scheme => nil | binary(),
:userinfo => nil | binary()
} (with opaque subterms) in the 1st position.
URI.append_path(
%URI{
:authority => nil,
:fragment => nil,
:host => <<103, 111, 111, 103, 108, 101, 46, 99, 97>>,
:path => nil,
:port => 443,
:query => nil,
:scheme => <<104, 116, 116, 112, 115>>,
:userinfo => nil
},
<<47, 102, 111, 111>>
)
Trending in Questions
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
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
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
Other Trending Topics
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
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
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
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
This looks like something to report to the elixir repo.
sabiwara
I think it should be fixed on the next 1.19rc: Mark inlined function call result as generated by sabiwara · Pull Request #14581 · elixir-lang/elixir · GitHub
sabiwara
OK I tried it out and it seems the error is still present on the v1.19 branch
Will open an issue.
Edit: issue link: Opaqueness warning on OTP28 · Issue #14750 · elixir-lang/elixir · GitHub
hez
Thank you!
lud
Hello,
Running into that tonight, and I’m not sure how to fix it without a dialyzer ignore.
I’m not sure I really understand the problem. Is dialyzer complaining that the given
authorityis not somehow inheriting the opaqueness? I tried to addnilwhich corresponds to the type, but I still have the error.If I understand correctly, instead of this:
We should have something like this?:
(When I say “we should” it’s only about making dialyzer happy again, I know it’s otherwise useless to specify the authority key to its default).
Currently my workaround is to use URI.parse which is more fragile because it involves string manipulation, or
@dialyzer {:no_opaque, ...}. Is there a real proper solution to build URI structs from known data (scheme,host,etc)sabiwara
For what it’s worth, we removed the opaqueness on
authority(PR) on main/1.20rc but there hasn’t been a version after 1.19.5 to backport these changes.So
:no_opaqueas a temporary stop-gap makes sense.lud
Thank you
grossvogel
I’m wondering if I’m doing something wrong, b/c I’m still seeing errors in my project despite the related Elixir issues being closed as fixed. To test, I created a brand new mix project with this code
and the result of
mix dialyzerin Elixir 1.20.1 and OTP 28.4 isAre folks still using the opaque exclusions, or is there something else I can do to resolve these?
sabiwara
Thanks for sharing @grossvogel. This issue is un-killable
You’re not doing anything wrong. But unfortunately I fear we’re getting out of options here to deal with it in the language itself.
I managed to silence it using the following two workarounds:
or
But honestly it might be better to just explicitly disable opaqueness checks when working with
MapSetrather than jumping through hoops and try to trick dialyzer.grossvogel
OK, thanks for the help! I’ll go ahead and disable opaqueness checks