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

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
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
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
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
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement