Small fixes (#896)

* Hide app builder unless target matches
* Fix compile-time warnings on Elixir v1.14+
This commit is contained in:
José Valim 2022-01-19 22:20:05 +01:00 committed by GitHub
parent 8fb937340a
commit 112b47908d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -108,7 +108,7 @@ defmodule Livebook.Notebook.Explore do
}
]
user_configs = Application.fetch_env!(:livebook, :explore_notebooks)
user_configs = Application.compile_env(:livebook, :explore_notebooks, [])
notebook_configs = [welcome_config] ++ user_configs ++ other_configs

View file

@ -14,7 +14,7 @@ defmodule Livebook.MixProject do
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: with_lock(deps()),
deps: with_lock(target_deps(Mix.target()) ++ deps()),
escript: escript(),
releases: releases(),
package: package()
@ -72,6 +72,9 @@ defmodule Livebook.MixProject do
]
end
defp target_deps(:app), do: [{:app_builder, path: "app_builder"}]
defp target_deps(_), do: []
@lock (with {:ok, contents} <- File.read("mix.lock"),
{:ok, quoted} <- Code.string_to_quoted(contents, warn_on_unnecessary_quotes: false),
{%{} = lock, _binding} <- Code.eval_quoted(quoted, []) do