nhpip
Hello,
I’ve been given the task to upgrade our product from OTP R22 / Elixir 1.11 to OTP R25 / Elixir 1.13.4 (hoping for 1.14). There is a test-case that works fine on 1.11 that is failing in 1.13.
This is the code, as is the test literally blocks and does nothing.
rando_info = users.rando
users = %{users | rando: %{rando_info | sign_pair: sign_pair, public_key: public_key, key_version: 1}}
# Make export request
request_payload =
%{user_id: users.admin.user_id,
type: "export",
device_id: users.admin.device.id,
data: %{until: NaiveDateTime.to_iso8601(NaiveDateTime.add(NaiveDateTime.utc_now, 900)),
users: [%{user_id: users.admin.user_id, key_version: users.admin.key_version},
%{user_id: users.approver1.user_id, key_version: users.approver1.key_version},
%{user_id: users.approver2.user_id, key_version: users.approver2.key_version},
%{user_id: users.rando.user_id, key_version: 1}]},
timestamp: NaiveDateTime.to_iso8601(NaiveDateTime.utc_now),
expiration: NaiveDateTime.to_iso8601(NaiveDateTime.add(NaiveDateTime.utc_now, 900)),
protocol_version: 1} |> Poison.encode!()
If I remove one line from the list of users:
%{user_id: users.admin.user_id,
type: "export",
device_id: users.admin.device.id,
data: %{until: NaiveDateTime.to_iso8601(NaiveDateTime.add(NaiveDateTime.utc_now, 900)),
users: [%{user_id: users.admin.user_id, key_version: users.admin.key_version},
%{user_id: users.approver1.user_id, key_version: users.approver1.key_version},
%{user_id: users.approver2.user_id, key_version: users.approver2.key_version}]},
timestamp: NaiveDateTime.to_iso8601(NaiveDateTime.utc_now),
expiration: NaiveDateTime.to_iso8601(NaiveDateTime.add(NaiveDateTime.utc_now, 900)),
protocol_version: 1} |> Poison.encode!()
I get a bunch of errors like:
warning: incompatible types:
%{rando: var1} !~ %{rando: var2}
in expression:
# test/api/export_test.exs:364
users.rando
where "users" was given the type %{rando: %{user_id: var13, user_id: var13, user_id: var13, user_id: var13, sign_pair: var14, public_key: var15, key_version: integer(), optional(dynamic()) => dynamic()}, rando: var16, rando: var17, admin: %{user_id: var5, key_version: var6, user_id: var5, device: %{id: var7, id: var7, optional(dynamic()) => dynamic()}, user_id: var5, sign_pair: %{public: var8, secret: var9, optional(dynamic()) => dynamic()}, key_version: var6, key_version: var6, device: %{id: var7, id: var7, optional(dynamic()) => dynamic()}, user_id: var5, sign_pair: %{public: var8, secret: var9, optional(dynamic()) => dynamic()}, optional(dynamic()) => dynamic()}, admin: %{user_id: var5, key_version: var6, user_id: var5, device: %
I can get the test to work by updating the users map via access methods:
rando_info = users.rando
rando_info = Map.replace(rando_info, :sign_pair, sign_pair)
|> Map.replace(:public_key, public_key)
|> Map.replace(:key_version, 1)
users = %{users | rando: rando_info}
users is a map like:
%{
admin: %{
account_version: 0,
claim_return: %{...},
...
},
approver1: %{
account_version: 0,
claim_return: %{...},
...
},
approver2: %{
account_version: 0,
claim_return: %{...},
...
},
rando: %{
account_version: 0,
claim_return: %{...},
...
}
}
I just found it odd that’s all
Thanks
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m aware of 2 such projects, are there others?
git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Hi,
we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
When I use Mix.install with a git dependency, using git@github.com:... how do I change the SSH identity used?
I’ve got two Github accoun...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
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
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 just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
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
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #elixirconf-us
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #security
- #elixirconf-eu
- #api
- #forms
- #performance










Showing Posts 7 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
nhpip
all the type errors:
https://github.com/nhpip/stuff/blob/master/test_case_map_type_warnings.txt
al2o3cr
That stack trace was super-helpful - the most recent change to
Module.Types.Unifywas a fix for this issue which sounds very much like what you’re experiencing:https://github.com/elixir-lang/elixir/issues/11658
This seems promising since:
nhpip
blocks as in…dead…but I connected another vm to the test-case vm…see above
al2o3cr
Can you post the full output of one of those? The example given cuts off after showing some odd repetitions (formatted for readability):
The message is coming from the
:unable_unifyformatter in the type-hinting system but that module already existed in 1.11, so something must have changed.Can you clarify “blocks” here? Does the test time out? I don’t see anything in the code you posted that could do that…
nhpip
the bad pid stacktrace
nhpip
Hmmmmm…this is the vm
nhpip
Edit to add that there is a nif that logs a message a few seconds after start. That doesn’t happen in the hang case. But the nif shouldn’t be involved with this test.