Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Elixir 1.14 and Erlang 25 #280

Merged
merged 2 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.11.4-otp-24
erlang 24.3.4.7
elixir 1.14.5-otp-25
erlang 25.3.2.1
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
import Config
bklebe marked this conversation as resolved.
Show resolved Hide resolved

config :logger, level: :debug

Expand Down Expand Up @@ -79,4 +79,4 @@ config :concentrate,
],
http_producer: Concentrate.Producer.HTTPoison

import_config "#{Mix.env()}.exs"
import_config "#{config_env()}.exs"
6 changes: 4 additions & 2 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use Mix.Config
import Config

import_config "*.local.exs"
for config <- "*.local.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
import_config config
end
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

config :sasl, errlog_type: :error

Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

config :logger,
level: :info,
Expand Down
8 changes: 2 additions & 6 deletions lib/concentrate/parser/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule Concentrate.Parser.Helpers do
end

def valid_route_id?(%{excluded_routes: {:ok, route_ids}}, route_id) do
not (route_id in route_ids)
bklebe marked this conversation as resolved.
Show resolved Hide resolved
route_id not in route_ids
end

def valid_route_id?(_, _) do
Expand Down Expand Up @@ -141,11 +141,7 @@ defmodule Concentrate.Parser.Helpers do
vehicle_timestamp > feed_timestamp do
_ =
Logger.warn(
"vehicle timestamp after feed timestamp feed_url=#{inspect(options.feed_url)} vehicle_id=#{
inspect(vehicle_id)
} feed_timestamp=#{inspect(feed_timestamp)} vehicle_timestamp=#{
inspect(vehicle_timestamp)
}"
"vehicle timestamp after feed timestamp feed_url=#{inspect(options.feed_url)} vehicle_id=#{inspect(vehicle_id)} feed_timestamp=#{inspect(feed_timestamp)} vehicle_timestamp=#{inspect(vehicle_timestamp)}"
)

:ok
Expand Down
16 changes: 4 additions & 12 deletions lib/concentrate/producer/httpoison/state_machine.ex
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do
defp handle_message(machine, unknown) do
_ =
Logger.error(fn ->
"#{__MODULE__}: got unexpected message url=#{inspect(machine.url)} message=#{
bklebe marked this conversation as resolved.
Show resolved Hide resolved
inspect(unknown)
}"
"#{__MODULE__}: got unexpected message url=#{inspect(machine.url)} message=#{inspect(unknown)}"
end)

{machine, [], []}
Expand Down Expand Up @@ -293,9 +291,7 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do

_ =
Logger.info(fn ->
"#{__MODULE__} updated: url=#{inspect(url(machine))} records=#{length(parsed)} time=#{
time / 1000
}"
"#{__MODULE__} updated: url=#{inspect(url(machine))} records=#{length(parsed)} time=#{time / 1000}"
end)

machine =
Expand All @@ -320,9 +316,7 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do
defp log_parse_error(error, machine, trace) do
_ =
Logger.error(fn ->
"#{__MODULE__}: parse error url=#{inspect(machine.url)} error=#{inspect(error)}\n#{
Exception.format_stacktrace(trace)
}"
"#{__MODULE__}: parse error url=#{inspect(machine.url)} error=#{inspect(error)}\n#{Exception.format_stacktrace(trace)}"
end)

[]
Expand All @@ -347,9 +341,7 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do
defp activate_fallback(%{fallback: {:not_active, url}} = machine) do
_ =
Logger.error(fn ->
"#{__MODULE__} activating fallback url=#{inspect(machine.url)} fallback_url=#{
inspect(url)
}"
"#{__MODULE__} activating fallback url=#{inspect(machine.url)} fallback_url=#{inspect(url)}"
end)

fallback_machine =
Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ defmodule Concentrate.MixProject do
dialyzer: [
plt_add_deps: :transitive,
flags: [
:race_conditions,
bklebe marked this conversation as resolved.
Show resolved Hide resolved
:unmatched_returns,
:underspecs,
:unknown
Expand Down