From 0ac010ba3fa41c9bd06565259de57f2a5b5bb8ad Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 22 Jan 2024 10:01:29 -0500 Subject: Replace custom fifo implementation with Exile This is for streaming media to ffmpeg thumbnailer. The existing implementation relies on undocumented behavior. Erlang open_port/2 does not officially support passing a string of a file path for opening. The specs clearly state you are to provide one of the following for open_port/2: {spawn, Command :: string() | binary()} | {spawn_driver, Command :: string() | binary()} | {spawn_executable, FileName :: file:name_all()} | {fd, In :: integer() >= 0, Out :: integer() >= 0} Our method technically works but is strongly discouraged as it can block the scheduler and dialyzer throws errors as it recognizes we're breaking the contract and some of the functions we wrote may never return. This is indirectly covered by the Erlang FAQ section "9.12 Why can't I open devices (e.g. a serial port) like normal files?" https://www.erlang.org/faq/problems#idm1127 --- mix.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'mix.exs') diff --git a/mix.exs b/mix.exs index 541a60555..5e164dbdc 100644 --- a/mix.exs +++ b/mix.exs @@ -184,6 +184,7 @@ defmodule Pleroma.Mixfile do {:vix, "~> 0.26.0"}, {:elixir_make, "~> 0.7.7", override: true}, {:blurhash, "~> 0.1.0", hex: :rinpatch_blurhash}, + {:exile, "~> 0.8.0"}, ## dev & test {:ex_doc, "~> 0.22", only: :dev, runtime: false}, -- cgit v1.2.3