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

Misc Maintenance #47

Merged
merged 8 commits into from
Nov 20, 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
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.10.4
otp: 21.0
- elixir: 1.11.4
otp: 23.0
- elixir: 1.12.3
otp: 24.0
- elixir: 1.13.0
otp: 24.0
- elixir: 1.14.0
otp: 25.0
- elixir: 1.15.0
otp: 26.0
check_formatted: true
warnings_as_errors: true

Expand Down
2 changes: 1 addition & 1 deletion lib/mix/tasks/uniform.gen.app.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule Mix.Tasks.Uniform.Gen.App do
path = "lib/#{lib}/uniform.exs"

if File.exists?(path) do
Logger.warn("Did not create #{path} because it already exists")
Logger.warning("Did not create #{path} because it already exists")
else
File.write!(path, """
[
Expand Down
6 changes: 3 additions & 3 deletions lib/mix/tasks/uniform.init.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ defmodule Mix.Tasks.Uniform.Init do
do_add_config(config, otp_app)

{:error, reason} ->
Logger.warn("Could not patch config/config.exs – reason: #{reason}")
Logger.warning("Could not patch config/config.exs – reason: #{reason}")
end
end

Expand All @@ -74,15 +74,15 @@ defmodule Mix.Tasks.Uniform.Init do
IO.puts("Added configuration in config/config.exs")

_ ->
Logger.warn(
Logger.warning(
"Could not patch config/config.exs because it does not contain `import Config`"
)
end
end

defp write_unless_exists(path, contents) do
if File.exists?(path) do
Logger.warn("Did not create #{path} because it already exists")
Logger.warning("Did not create #{path} because it already exists")
else
File.write!(path, contents)
IO.puts("Created #{path}")
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Uniform.MixProject do
[
app: :uniform,
version: @version,
elixir: "~> 1.10",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
Expand All @@ -29,8 +29,8 @@ defmodule Uniform.MixProject do

defp deps do
[
{:ex_doc, ">= 0.28.4", only: [:dev, :docs], runtime: false},
{:sourceror, "~> 0.11"}
{:ex_doc, ">= 0.30.9", only: [:dev, :docs], runtime: false},
{:sourceror, "~> 0.14"}
]
end

Expand Down
12 changes: 6 additions & 6 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%{
"earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"},
"ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"},
"earmark_parser": {:hex, :earmark_parser, "1.4.37", "2ad73550e27c8946648b06905a57e4d454e4d7229c2dafa72a0348c99d8be5f7", [:mix], [], "hexpm", "6b19783f2802f039806f375610faa22da130b8edc21209d0bff47918bb48360e"},
"ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
"nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"},
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"},
"nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
2 changes: 1 addition & 1 deletion test/projects/empty/mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%{
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
3 changes: 1 addition & 2 deletions test/projects/full/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ defmodule Full.MixProject do
# comment to remove
{:esbuild, "~> 0.5", runtime: Mix.env() == :dev},
{:graphql_document, "~> 0.2.1"},
# test that options are retained
{:sourceror, "~> 0.11.1", path: "../../../deps/sourceror", override: true},
{:sourceror, "~> 0.14"},
capitalist marked this conversation as resolved.
Show resolved Hide resolved
{:decimal, "~> 2.0"}
]
end
Expand Down
2 changes: 1 addition & 1 deletion test/projects/full/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
"esbuild": {:hex, :esbuild, "0.5.0", "d5bb08ff049d7880ee3609ed5c4b864bd2f46445ea40b16b4acead724fb4c4a3", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "f183a0b332d963c4cfaf585477695ea59eef9a6f2204fdd0efa00e099694ffe5"},
"graphql_document": {:hex, :graphql_document, "0.2.1", "84c3b2efcab12b5b4caedebae525611ca2401b4e5cbd9b9194dd165b0c909423", [:mix], [{:decimal, ">= 0.2.5", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "14eb32729cae244a4921571bd2cd820cfe966171a7ba179cd6341b703d995bdc"},
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
2 changes: 1 addition & 1 deletion test/projects/initable/mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%{
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
2 changes: 1 addition & 1 deletion test/projects/missing_template/mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%{
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
2 changes: 1 addition & 1 deletion test/projects/missing_template_dir/mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%{
"sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"},
"sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"},
}
8 changes: 4 additions & 4 deletions test/uniform/app_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ defmodule Uniform.AppTest do
assert %MixDep{mix_deps: [:indirect_mix]} = app.internal.deps.mix.included_mix
assert %MixDep{mix_deps: []} = app.internal.deps.mix.indirect_mix

assert app.internal.deps.included.lib == [
assert Enum.sort(app.internal.deps.included.lib) == [
:always_included_lib,
:included_lib,
:indirectly_included_lib
]
capitalist marked this conversation as resolved.
Show resolved Hide resolved

assert app.internal.deps.included.mix == [
assert Enum.sort(app.internal.deps.included.mix) == [
:always_included_mix,
:included_mix,
:indirect_mix
]

assert app.internal.deps.all.lib == [
assert Enum.sort(app.internal.deps.all.lib) == [
:always_included_lib,
:excluded_lib,
:included_lib,
Expand All @@ -105,7 +105,7 @@ defmodule Uniform.AppTest do
:with_only
]

assert app.internal.deps.all.mix == [
assert Enum.sort(app.internal.deps.all.mix) == [
:always_included_mix,
:excluded_mix,
:included_mix,
Expand Down
Loading