Lucian-Bosinceanu

Lucian-Bosinceanu

gpb dependency not fully compiled when migrating to Elixir 15 and OTP 26

Hello!

I am currently working on upgrading the Elixir and Erlang versions of an app from:

elixir 1.12.2
erlang 24.2.1

to:

elixir 1.15.6-otp-26
erlang 26.1.1

I’m using asdf as a dependency manager and I configured the new versions to be set at a local level, which creted a .tool-versions file.

Using the older versions, I was able to compile the following dependency:

defp deps do
    [
      # ...
      {:gpb, "~> 4.17", override: true},
      # ...
    ]
  end

As a result of compiling the dependency, its ./deps/gpb/ebin folder had these files:

-rw-r--r--  1 X  staff     735 Oct  3 14:36 gpb.app
-rw-r--r--  1 X  staff   86292 Oct  3 14:36 gpb.beam
-rw-r--r--  1 X  staff   39024 Oct  3 14:36 gpb_analyzer.beam
-rw-r--r--  1 X  staff   27368 Oct  3 14:36 gpb_codegen.beam
-rw-r--r--  1 X  staff   50508 Oct  3 14:36 gpb_codemorpher.beam
-rw-r--r--  1 X  staff  131500 Oct  3 14:36 gpb_compile.beam
-rw-r--r--  1 X  staff   37764 Oct  3 14:36 gpb_compile_descr.beam
-rw-r--r--  1 X  staff   17356 Oct  3 14:36 gpb_decoders_lib.beam
-rw-r--r--  1 X  staff   87360 Oct  3 14:36 gpb_defs.beam
-rw-r--r--  1 X  staff  438812 Oct  3 14:36 gpb_descriptor.beam
-rw-r--r--  1 X  staff   82868 Oct  3 14:36 gpb_gen_decoders.beam
-rw-r--r--  1 X  staff   62812 Oct  3 14:36 gpb_gen_encoders.beam
-rw-r--r--  1 X  staff   53124 Oct  3 14:36 gpb_gen_introspect.beam
-rw-r--r--  1 X  staff  101252 Oct  3 14:36 gpb_gen_json_decoders.beam
-rw-r--r--  1 X  staff   71140 Oct  3 14:36 gpb_gen_json_encoders.beam
-rw-r--r--  1 X  staff   33968 Oct  3 14:36 gpb_gen_mergers.beam
-rw-r--r--  1 X  staff   92652 Oct  3 14:36 gpb_gen_nif.beam
-rw-r--r--  1 X  staff   36428 Oct  3 14:36 gpb_gen_translators.beam
-rw-r--r--  1 X  staff   35784 Oct  3 14:36 gpb_gen_types.beam
-rw-r--r--  1 X  staff   47320 Oct  3 14:36 gpb_gen_verifiers.beam
-rw-r--r--  1 X  staff   45952 Oct  3 14:36 gpb_lib.beam
-rw-r--r--  1 X  staff   35376 Oct  3 14:36 gpb_names.beam
-rw-r--r--  1 X  staff   42292 Oct  3 14:36 gpb_parse.beam
-rw-r--r--  1 X  staff  197944 Oct  3 14:36 gpb_parse_old.beam
-rw-r--r--  1 X  staff   22632 Oct  3 14:36 gpb_scan.beam
-rw-r--r--  1 X  staff  202588 Oct  3 14:36 gpb_scan_old.beam

However, after upgrading Erlang and Elixir to the new versions and gpb to 4.20, the result of the dependency compilation ended up being different. The dependency is still compiling, but the ./deps/gpb/ebin folder now contains less files:

-rw-r--r--  1 X  staff   37252 Oct  3 15:05 gpb_compile_descr.beam
-rw-r--r--  1 X  staff  449744 Oct  3 15:05 gpb_descriptor.beam

The problem is that the main app requires gpb_compile.beam to be present in the specified folder in order to perform custom proto generation of some files. Otherwise, the app will not compile.

Things that I’ve tried, with no prevail:

  1. Upgrading protoc from 3.21.9 to 24.3;
  2. Making sure there are no whitespaces in the paths;
  3. Running mix local.rebar or with --force.

Please advise on how to properly compile this dependency given the new Elixir and Erlang versions. Thank you!

First Post!

dimitarvp

dimitarvp

Sounds like somebody used private undocumented behaviour – never recommended.

Still, if you want to try and upgrade, it might be worth trying gradually incrementing Erlang versions first, and then Elixir ones, until you find the exact version that “breaks” it.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New

Other popular topics Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

We're in Beta

About us Mission Statement