wkirschbaum

wkirschbaum

Is there a way to supress Elixir warnings from an Erlang module in a mix project?

When upgrading to OTP 27 the following warning pops up:

    warning: :public_key.encrypt_public/3 is deprecated. Do not use
    │
  7 │     :public_key.encrypt_public(message, public_key,
    │                 ~

and checking on the erlang channel on slack Bram Verburg said that the following

“TL;DR: the OTP team says they have no plans to remove the functions, so if you have a need that is not affected by the Marvin vulnerability or a way to ensure the underlying libcrypto is not vulnerable you can continue to use the deprecated functions”

and gave me the following link: Security Working Group Minutes - #6 by voltone - EEF Security - Erlang Programming Language Forum - Erlang Forums.

In our case, our code is not vulnerable, so this warning is causing unnecessary noise. To avoid the issues from the The Broken Window Theory, it would be good to have a way to suppress this warning and keep our output clean.

There seems to be a difference between what is deprecated in Erlang world and the Elixir world, so this might not be an isolated case. How do people deal with this in their projects?

Marked As Solved

josevalim

josevalim

Creator of Elixir

You can “hide” it for now:

defp public_key_module, do: :public_key

And then:

public_key_module().encrypt_public(message, ...)

But the type system may catch it in a year or two. You can ping me again then! We have historically not allowed warnings to be disabled but, except ones with false positives, but we may revisit this decision.

Also Liked

wkirschbaum

wkirschbaum

Thanks @josevalim, will certainly ping you when this workaround expires. :wink:

Where Next?

Popular in Questions Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
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
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
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 records...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement