From 3650c50e9ceda08346f97f40d0d93e9ad0db7de5 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Thu, 26 Dec 2024 15:50:31 -0800 Subject: [PATCH 01/15] [feat] Attempt to support elixir 1.18 --- .github/workflows/elixir.yml | 6 ++++++ apps/server/lib/lexical/server/boot.ex | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 8b10adfd0..4546c4b5c 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -154,6 +154,12 @@ jobs: # and running the workflow steps. matrix: include: + - elixir: "1.18" + otp: "27" + - elixir: "1.18" + otp: "26" + - elixir: "1.18" + otp: "25" - elixir: "1.17" otp: "27" - elixir: "1.17" diff --git a/apps/server/lib/lexical/server/boot.ex b/apps/server/lib/lexical/server/boot.ex index 2a5df77cc..1b58b6301 100644 --- a/apps/server/lib/lexical/server/boot.ex +++ b/apps/server/lib/lexical/server/boot.ex @@ -88,7 +88,8 @@ defmodule Lexical.Server.Boot do "1.15.0" => ">= 1.15.3", "1.16.0" => ">= 1.16.0", "1.17.0-rc" => ">= 1.17.0-rc", - "1.17.0" => ">= 1.17.0" + "1.17.0" => ">= 1.17.0", + "1.18.0" => ">= 1.18.1" } @allowed_erlang %{ "24" => ">= 24.3.4", From 86e6b6853fe3f46780ebd5ab625b4ca8f2e90d9d Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Thu, 26 Dec 2024 15:52:48 -0800 Subject: [PATCH 02/15] elixir 1.18 doesn't support otp 25 --- .github/workflows/elixir.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 4546c4b5c..398955528 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -158,8 +158,6 @@ jobs: otp: "27" - elixir: "1.18" otp: "26" - - elixir: "1.18" - otp: "25" - elixir: "1.17" otp: "27" - elixir: "1.17" From 78d4d33ec9b83025f9ecec78e913db7d51f6080c Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Thu, 26 Dec 2024 16:02:21 -0800 Subject: [PATCH 03/15] fixed compile warning --- .../mix.tasks.deps.safe_compile.ex | 612 +++++++++--------- 1 file changed, 307 insertions(+), 305 deletions(-) diff --git a/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex b/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex index 51d871cc8..664463a3d 100644 --- a/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex +++ b/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex @@ -1,381 +1,383 @@ -defmodule Mix.Tasks.Deps.SafeCompile do - use Mix.Task +if not Elixir.Features.compile_keeps_current_directory?() do + defmodule Mix.Tasks.Deps.SafeCompile do + use Mix.Task - @shortdoc "Compiles dependencies" + @shortdoc "Compiles dependencies" - @moduledoc """ - Compiles dependencies. + @moduledoc """ + Compiles dependencies. - By default, this task attempts to compile all dependencies. - A list of dependencies can be given to compile multiple - dependencies in order. + By default, this task attempts to compile all dependencies. + A list of dependencies can be given to compile multiple + dependencies in order. - This task attempts to detect if the project contains one of - the following files and act accordingly: + This task attempts to detect if the project contains one of + the following files and act accordingly: - * `mix.exs` - invokes `mix compile` - * `rebar.config` - invokes `rebar compile` - * `Makefile.win`- invokes `nmake /F Makefile.win` (only on Windows) - * `Makefile` - invokes `gmake` on DragonFlyBSD, FreeBSD, NetBSD, and OpenBSD, - invokes `make` on any other operating system (except on Windows) + * `mix.exs` - invokes `mix compile` + * `rebar.config` - invokes `rebar compile` + * `Makefile.win`- invokes `nmake /F Makefile.win` (only on Windows) + * `Makefile` - invokes `gmake` on DragonFlyBSD, FreeBSD, NetBSD, and OpenBSD, + invokes `make` on any other operating system (except on Windows) - The compilation can be customized by passing a `compile` option - in the dependency: + The compilation can be customized by passing a `compile` option + in the dependency: - {:some_dependency, "0.1.0", compile: "command to compile"} + {:some_dependency, "0.1.0", compile: "command to compile"} - If a list of dependencies is given, Mix will attempt to compile - them as is. For example, if project `a` depends on `b`, calling - `mix deps.compile a` will compile `a` even if `b` is out of - date. This is to allow parts of the dependency tree to be - recompiled without propagating those changes upstream. To ensure - `b` is included in the compilation step, pass `--include-children`. + If a list of dependencies is given, Mix will attempt to compile + them as is. For example, if project `a` depends on `b`, calling + `mix deps.compile a` will compile `a` even if `b` is out of + date. This is to allow parts of the dependency tree to be + recompiled without propagating those changes upstream. To ensure + `b` is included in the compilation step, pass `--include-children`. - ## Command line options + ## Command line options - * `--force` - force compilation of deps - * `--skip-umbrella-children` - skips umbrella applications from compiling - * `--skip-local-deps` - skips non-remote dependencies, such as path deps, from compiling + * `--force` - force compilation of deps + * `--skip-umbrella-children` - skips umbrella applications from compiling + * `--skip-local-deps` - skips non-remote dependencies, such as path deps, from compiling - """ + """ - @switches [ - include_children: :boolean, - force: :boolean, - skip_umbrella_children: :boolean, - skip_local_deps: :boolean - ] + @switches [ + include_children: :boolean, + force: :boolean, + skip_umbrella_children: :boolean, + skip_local_deps: :boolean + ] - @impl true - def run(args) do - if Elixir.Features.compile_keeps_current_directory?() do - Mix.Tasks.Deps.Compile.run(args) - else - unless "--no-archives-check" in args do - Mix.Task.run("archive.check", args) + @impl true + def run(args) do + if Elixir.Features.compile_keeps_current_directory?() do + Mix.Tasks.Deps.Compile.run(args) + else + unless "--no-archives-check" in args do + Mix.Task.run("archive.check", args) + end + + Mix.Project.get!() + deps = Mix.Dep.load_and_cache() + + case OptionParser.parse(args, switches: @switches) do + {opts, [], _} -> + # Because this command may be invoked explicitly with + # deps.compile, we simply try to compile any available + # or local dependency. + compile(filter_available_and_local_deps(deps), opts) + + {opts, tail, _} -> + compile(Mix.Dep.filter_by_name(tail, deps, opts), opts) + end end + end - Mix.Project.get!() - deps = Mix.Dep.load_and_cache() + @doc false + def compile(deps, options \\ []) do + shell = Mix.shell() + config = Mix.Project.deps_config() + Mix.Task.run("deps.precompile") - case OptionParser.parse(args, switches: @switches) do - {opts, [], _} -> - # Because this command may be invoked explicitly with - # deps.compile, we simply try to compile any available - # or local dependency. - compile(filter_available_and_local_deps(deps), opts) + compiled = + deps + |> reject_umbrella_children(options) + |> reject_local_deps(options) + |> Enum.map(fn %Mix.Dep{app: app, status: status, opts: opts, scm: scm} = dep -> + check_unavailable!(app, scm, status) + maybe_clean(dep, options) - {opts, tail, _} -> - compile(Mix.Dep.filter_by_name(tail, deps, opts), opts) - end - end - end + compiled? = + cond do + not is_nil(opts[:compile]) -> + do_compile(dep, config) - @doc false - def compile(deps, options \\ []) do - shell = Mix.shell() - config = Mix.Project.deps_config() - Mix.Task.run("deps.precompile") - - compiled = - deps - |> reject_umbrella_children(options) - |> reject_local_deps(options) - |> Enum.map(fn %Mix.Dep{app: app, status: status, opts: opts, scm: scm} = dep -> - check_unavailable!(app, scm, status) - maybe_clean(dep, options) - - compiled? = - cond do - not is_nil(opts[:compile]) -> - do_compile(dep, config) - - Mix.Dep.mix?(dep) -> - do_mix(dep, config) - - Mix.Dep.make?(dep) -> - do_make(dep, config) - - dep.manager == :rebar3 -> - do_rebar3(dep, config) - - true -> - shell.error( - ~s[Could not compile #{inspect(app)}, no "mix.exs", "rebar.config" or "Makefile"] <> - ~s[pass :compile as an option to customize compilation, set it to "false" to do nothing] - ) - - false - end - - # We should touch fetchable dependencies even if they - # did not compile otherwise they will always be marked - # as stale, even when there is nothing to do. - fetchable? = touch_fetchable(scm, opts[:build]) - - compiled? and fetchable? - end) + Mix.Dep.mix?(dep) -> + do_mix(dep, config) - if true in compiled, do: Mix.Task.run("will_recompile"), else: :ok - end + Mix.Dep.make?(dep) -> + do_make(dep, config) - defp maybe_clean(dep, opts) do - # If a dependency was marked as fetched or with an out of date lock - # or missing the app file, we always compile it from scratch. - if Keyword.get(opts, :force, false) or Mix.Dep.compilable?(dep) do - File.rm_rf!(Path.join([Mix.Project.build_path(), "lib", Atom.to_string(dep.app)])) - end - end + dep.manager == :rebar3 -> + do_rebar3(dep, config) - defp touch_fetchable(scm, path) do - if scm.fetchable? do - path = Path.join(path, ".mix") - File.mkdir_p!(path) - File.touch!(Path.join(path, "compile.fetch")) - true - else - false - end - end + true -> + shell.error( + ~s[Could not compile #{inspect(app)}, no "mix.exs", "rebar.config" or "Makefile"] <> + ~s[pass :compile as an option to customize compilation, set it to "false" to do nothing] + ) - defp check_unavailable!(app, scm, {:unavailable, path}) do - if scm.fetchable? do - Mix.raise( - "Cannot compile dependency #{inspect(app)} because " <> - "it isn't available, run \"mix deps.get\" first" - ) - else - Mix.raise( - "Cannot compile dependency #{inspect(app)} because " <> - "it isn't available, please ensure the dependency is at " <> - inspect(Path.relative_to_cwd(path)) - ) + false + end + + # We should touch fetchable dependencies even if they + # did not compile otherwise they will always be marked + # as stale, even when there is nothing to do. + fetchable? = touch_fetchable(scm, opts[:build]) + + compiled? and fetchable? + end) + + if true in compiled, do: Mix.Task.run("will_recompile"), else: :ok end - end - defp check_unavailable!(_, _, _) do - :ok - end + defp maybe_clean(dep, opts) do + # If a dependency was marked as fetched or with an out of date lock + # or missing the app file, we always compile it from scratch. + if Keyword.get(opts, :force, false) or Mix.Dep.compilable?(dep) do + File.rm_rf!(Path.join([Mix.Project.build_path(), "lib", Atom.to_string(dep.app)])) + end + end - defp do_mix(dep, _config) do - Mix.Dep.in_dependency(dep, fn _ -> - config = Mix.Project.config() + defp touch_fetchable(scm, path) do + if scm.fetchable? do + path = Path.join(path, ".mix") + File.mkdir_p!(path) + File.touch!(Path.join(path, "compile.fetch")) + true + else + false + end + end - if req = old_elixir_req(config) do - Mix.shell().error( - "warning: the dependency #{inspect(dep.app)} requires Elixir #{inspect(req)} " <> - "but you are running on v#{System.version()}" + defp check_unavailable!(app, scm, {:unavailable, path}) do + if scm.fetchable? do + Mix.raise( + "Cannot compile dependency #{inspect(app)} because " <> + "it isn't available, run \"mix deps.get\" first" + ) + else + Mix.raise( + "Cannot compile dependency #{inspect(app)} because " <> + "it isn't available, please ensure the dependency is at " <> + inspect(Path.relative_to_cwd(path)) ) end + end - try do - options = [ - "--from-mix-deps-compile", - "--no-archives-check", - "--no-warnings-as-errors" - ] + defp check_unavailable!(_, _, _) do + :ok + end - res = Mix.Task.run("compile", options) - match?({:ok, _}, res) - catch - kind, reason -> - app = dep.app + defp do_mix(dep, _config) do + Mix.Dep.in_dependency(dep, fn _ -> + config = Mix.Project.config() + if req = old_elixir_req(config) do Mix.shell().error( - "could not compile dependency #{inspect(app)}, \"mix compile\" failed. " <> - deps_compile_feedback(app) + "warning: the dependency #{inspect(dep.app)} requires Elixir #{inspect(req)} " <> + "but you are running on v#{System.version()}" ) + end + + try do + options = [ + "--from-mix-deps-compile", + "--no-archives-check", + "--no-warnings-as-errors" + ] + + res = Mix.Task.run("compile", options) + match?({:ok, _}, res) + catch + kind, reason -> + app = dep.app + + Mix.shell().error( + "could not compile dependency #{inspect(app)}, \"mix compile\" failed. " <> + deps_compile_feedback(app) + ) + + :erlang.raise(kind, reason, __STACKTRACE__) + end + end) + end - :erlang.raise(kind, reason, __STACKTRACE__) + defp do_rebar3(%Mix.Dep{opts: opts} = dep, config) do + dep_path = opts[:dest] + build_path = opts[:build] + + # For Rebar3, we need to copy the source/ebin to the target/ebin + # before we run the command given that REBAR_BARE_COMPILER_OUTPUT_DIR + # writes directly to _build. + # + # credo:disable-for-next-line Credo.Check.Design.TagTODO + # TODO: We still symlink ebin/ by default for backwards compatibility. + # This partially negates the effects of REBAR_BARE_COMPILER_OUTPUT_DIR + # if an ebin directory exists, so we should consider disabling it in future + # releases when rebar3 v3.14+ is reasonably adopted. + config = Keyword.put(config, :app_path, build_path) + Mix.Project.build_structure(config, symlink_ebin: true, source: dep_path) + + # Build the rebar config and setup the command line + config_path = Path.join(build_path, "mix.rebar.config") + lib_path = Path.join(config[:env_path], "lib/*/ebin") + File.write!(config_path, rebar_config(dep)) + + env = [ + # REBAR_BARE_COMPILER_OUTPUT_DIR is only honored by rebar3 >= 3.14 + {"REBAR_BARE_COMPILER_OUTPUT_DIR", build_path}, + {"REBAR_CONFIG", config_path}, + {"REBAR_PROFILE", "prod"}, + {"TERM", "dumb"} + ] + + cmd = "#{rebar_cmd(dep)} bare compile --paths #{lib_path}" + do_command(dep, config, cmd, false, env) + + build_priv = Path.join(build_path, "priv") + dep_priv = Path.join(dep_path, "priv") + + # Copy priv/ after compilation too if it was created then + if File.exists?(dep_priv) and not File.exists?(build_priv) do + Mix.Utils.symlink_or_copy(dep_priv, build_priv) end - end) - end - defp do_rebar3(%Mix.Dep{opts: opts} = dep, config) do - dep_path = opts[:dest] - build_path = opts[:build] - - # For Rebar3, we need to copy the source/ebin to the target/ebin - # before we run the command given that REBAR_BARE_COMPILER_OUTPUT_DIR - # writes directly to _build. - # - # credo:disable-for-next-line Credo.Check.Design.TagTODO - # TODO: We still symlink ebin/ by default for backwards compatibility. - # This partially negates the effects of REBAR_BARE_COMPILER_OUTPUT_DIR - # if an ebin directory exists, so we should consider disabling it in future - # releases when rebar3 v3.14+ is reasonably adopted. - config = Keyword.put(config, :app_path, build_path) - Mix.Project.build_structure(config, symlink_ebin: true, source: dep_path) - - # Build the rebar config and setup the command line - config_path = Path.join(build_path, "mix.rebar.config") - lib_path = Path.join(config[:env_path], "lib/*/ebin") - File.write!(config_path, rebar_config(dep)) - - env = [ - # REBAR_BARE_COMPILER_OUTPUT_DIR is only honored by rebar3 >= 3.14 - {"REBAR_BARE_COMPILER_OUTPUT_DIR", build_path}, - {"REBAR_CONFIG", config_path}, - {"REBAR_PROFILE", "prod"}, - {"TERM", "dumb"} - ] - - cmd = "#{rebar_cmd(dep)} bare compile --paths #{lib_path}" - do_command(dep, config, cmd, false, env) - - build_priv = Path.join(build_path, "priv") - dep_priv = Path.join(dep_path, "priv") + Code.prepend_path(Path.join(build_path, "ebin")) + true + end - # Copy priv/ after compilation too if it was created then - if File.exists?(dep_priv) and not File.exists?(build_priv) do - Mix.Utils.symlink_or_copy(dep_priv, build_priv) + defp rebar_config(dep) do + dep.extra + |> Mix.Rebar.dependency_config() + |> Mix.Rebar.serialize_config() end - Code.prepend_path(Path.join(build_path, "ebin")) - true - end + defp rebar_cmd(%Mix.Dep{manager: manager} = dep) do + Mix.Rebar.rebar_cmd(manager) || handle_rebar_not_found(dep) + end - defp rebar_config(dep) do - dep.extra - |> Mix.Rebar.dependency_config() - |> Mix.Rebar.serialize_config() - end + defp handle_rebar_not_found(%Mix.Dep{app: app, manager: manager}) do + shell = Mix.shell() - defp rebar_cmd(%Mix.Dep{manager: manager} = dep) do - Mix.Rebar.rebar_cmd(manager) || handle_rebar_not_found(dep) - end - - defp handle_rebar_not_found(%Mix.Dep{app: app, manager: manager}) do - shell = Mix.shell() + shell.info( + "Could not find \"#{manager}\", which is needed to build dependency #{inspect(app)}" + ) - shell.info( - "Could not find \"#{manager}\", which is needed to build dependency #{inspect(app)}" - ) + shell.info("I can install a local copy which is just used by Mix") - shell.info("I can install a local copy which is just used by Mix") + install_question = + "Shall I install #{manager}? (if running non-interactively, " <> + "use \"mix local.rebar --force\")" - install_question = - "Shall I install #{manager}? (if running non-interactively, " <> - "use \"mix local.rebar --force\")" + unless shell.yes?(install_question) do + error_message = + "Could not find \"#{manager}\" to compile " <> + "dependency #{inspect(app)}, please ensure \"#{manager}\" is available" - unless shell.yes?(install_question) do - error_message = - "Could not find \"#{manager}\" to compile " <> - "dependency #{inspect(app)}, please ensure \"#{manager}\" is available" + Mix.raise(error_message) + end - Mix.raise(error_message) + (Mix.Tasks.Local.Rebar.run([]) && Mix.Rebar.local_rebar_cmd(manager)) || + Mix.raise("\"#{manager}\" installation failed") end - (Mix.Tasks.Local.Rebar.run([]) && Mix.Rebar.local_rebar_cmd(manager)) || - Mix.raise("\"#{manager}\" installation failed") - end + defp do_make(dep, config) do + command = make_command(dep) + do_command(dep, config, command, true, [{"IS_DEP", "1"}]) + build_structure(dep, config) + true + end - defp do_make(dep, config) do - command = make_command(dep) - do_command(dep, config, command, true, [{"IS_DEP", "1"}]) - build_structure(dep, config) - true - end + defp make_command(dep) do + makefile_win? = makefile_win?(dep) - defp make_command(dep) do - makefile_win? = makefile_win?(dep) + command = + case :os.type() do + {:win32, _} when makefile_win? -> + "nmake /F Makefile.win" - command = - case :os.type() do - {:win32, _} when makefile_win? -> - "nmake /F Makefile.win" + {:unix, type} when type in [:dragonfly, :freebsd, :netbsd, :openbsd] -> + "gmake" - {:unix, type} when type in [:dragonfly, :freebsd, :netbsd, :openbsd] -> - "gmake" + _ -> + "make" + end - _ -> - "make" + if erlang_mk?(dep) do + "#{command} clean && #{command}" + else + command end - - if erlang_mk?(dep) do - "#{command} clean && #{command}" - else - command end - end - defp do_compile(%Mix.Dep{opts: opts} = dep, config) do - if command = opts[:compile] do - do_command(dep, config, command, true) - build_structure(dep, config) - true - else - false + defp do_compile(%Mix.Dep{opts: opts} = dep, config) do + if command = opts[:compile] do + do_command(dep, config, command, true) + build_structure(dep, config) + true + else + false + end end - end - defp do_command(dep, config, command, print_app?, env \\ []) do - %Mix.Dep{app: app, system_env: system_env, opts: opts} = dep + defp do_command(dep, config, command, print_app?, env \\ []) do + %Mix.Dep{app: app, system_env: system_env, opts: opts} = dep - env = [{"ERL_LIBS", Path.join(config[:env_path], "lib")} | system_env] ++ env + env = [{"ERL_LIBS", Path.join(config[:env_path], "lib")} | system_env] ++ env - if Mix.shell().cmd(command, env: env, print_app: print_app?, cd: opts[:dest]) != 0 do - Mix.raise( - "Could not compile dependency #{inspect(app)}, \"#{command}\" command failed. " <> - deps_compile_feedback(app) - ) - end + if Mix.shell().cmd(command, env: env, print_app: print_app?, cd: opts[:dest]) != 0 do + Mix.raise( + "Could not compile dependency #{inspect(app)}, \"#{command}\" command failed. " <> + deps_compile_feedback(app) + ) + end - true - end + true + end - defp build_structure(%Mix.Dep{opts: opts}, config) do - config = Keyword.put(config, :app_path, opts[:build]) - Mix.Project.build_structure(config, symlink_ebin: true, source: opts[:dest]) - Code.prepend_path(Path.join(opts[:build], "ebin")) - end + defp build_structure(%Mix.Dep{opts: opts}, config) do + config = Keyword.put(config, :app_path, opts[:build]) + Mix.Project.build_structure(config, symlink_ebin: true, source: opts[:dest]) + Code.prepend_path(Path.join(opts[:build], "ebin")) + end - defp old_elixir_req(config) do - req = config[:elixir] + defp old_elixir_req(config) do + req = config[:elixir] - if req && not Version.match?(System.version(), req) do - req + if req && not Version.match?(System.version(), req) do + req + end end - end - defp erlang_mk?(%Mix.Dep{opts: opts}) do - File.regular?(Path.join(opts[:dest], "erlang.mk")) - end + defp erlang_mk?(%Mix.Dep{opts: opts}) do + File.regular?(Path.join(opts[:dest], "erlang.mk")) + end - defp makefile_win?(%Mix.Dep{opts: opts}) do - File.regular?(Path.join(opts[:dest], "Makefile.win")) - end + defp makefile_win?(%Mix.Dep{opts: opts}) do + File.regular?(Path.join(opts[:dest], "Makefile.win")) + end - defp reject_umbrella_children(deps, options) do - if options[:skip_umbrella_children] do - Enum.reject(deps, fn %{opts: opts} -> Keyword.get(opts, :from_umbrella) == true end) - else - deps + defp reject_umbrella_children(deps, options) do + if options[:skip_umbrella_children] do + Enum.reject(deps, fn %{opts: opts} -> Keyword.get(opts, :from_umbrella) == true end) + else + deps + end end - end - defp filter_available_and_local_deps(deps) do - Enum.filter(deps, fn dep -> - Mix.Dep.available?(dep) or not dep.scm.fetchable? - end) - end + defp filter_available_and_local_deps(deps) do + Enum.filter(deps, fn dep -> + Mix.Dep.available?(dep) or not dep.scm.fetchable? + end) + end - defp reject_local_deps(deps, options) do - if options[:skip_local_deps] do - Enum.filter(deps, fn %{scm: scm} -> scm.fetchable? end) - else - deps + defp reject_local_deps(deps, options) do + if options[:skip_local_deps] do + Enum.filter(deps, fn %{scm: scm} -> scm.fetchable? end) + else + deps + end end - end - defp deps_compile_feedback(app) do - if Mix.install?() do - "Errors may have been logged above. You may run Mix.install/2 to try again or " <> - "change the arguments to Mix.install/2 to try another version" - else - "Errors may have been logged above. You can recompile this dependency with " <> - ~s["mix deps.compile #{app}", update it with "mix deps.update #{app}" or ] <> - ~s[clean it with "mix deps.clean #{app}"] + defp deps_compile_feedback(app) do + if Mix.install?() do + "Errors may have been logged above. You may run Mix.install/2 to try again or " <> + "change the arguments to Mix.install/2 to try another version" + else + "Errors may have been logged above. You can recompile this dependency with " <> + ~s["mix deps.compile #{app}", update it with "mix deps.update #{app}" or ] <> + ~s[clean it with "mix deps.clean #{app}"] + end end end end From 9beaf0868288999813ae9dfde2167dd4240c4eac Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 14:35:48 -0800 Subject: [PATCH 04/15] [1.18] Updated deps to latest to fix warnings --- apps/common/mix.exs | 4 ++-- apps/protocol/mix.exs | 2 +- apps/remote_control/mix.exs | 9 ++++---- apps/server/mix.exs | 5 ++--- mix.exs | 2 +- mix.lock | 38 ++++++++++++++++---------------- projects/lexical_credo/mix.exs | 2 +- projects/lexical_plugin/mix.exs | 4 ++-- projects/lexical_shared/mix.exs | 6 ++--- projects/lexical_shared/mix.lock | 16 +++++++------- 10 files changed, 43 insertions(+), 45 deletions(-) diff --git a/apps/common/mix.exs b/apps/common/mix.exs index 6da689bf8..105e1d754 100644 --- a/apps/common/mix.exs +++ b/apps/common/mix.exs @@ -37,8 +37,8 @@ defmodule Common.MixProject do {:lexical_test, path: "../../projects/lexical_test", only: :test}, {:snowflake, "~> 1.0"}, {:sourceror, "~> 1.4"}, - {:stream_data, "~> 0.6", only: [:test], runtime: false}, - {:patch, "~> 0.12", only: [:test], optional: true, runtime: false} + {:stream_data, "~> 1.1", only: [:test], runtime: false}, + {:patch, "~> 0.15", only: [:test], optional: true, runtime: false} ] end end diff --git a/apps/protocol/mix.exs b/apps/protocol/mix.exs index b9e65d608..4d40edb8c 100644 --- a/apps/protocol/mix.exs +++ b/apps/protocol/mix.exs @@ -34,7 +34,7 @@ defmodule Lexical.Protocol.MixProject do {:lexical_test, path: "../../projects/lexical_test", only: :test}, {:common, in_umbrella: true}, {:jason, "~> 1.4", optional: true}, - {:patch, "~> 0.12", only: [:test]}, + {:patch, "~> 0.15", only: [:test]}, {:proto, in_umbrella: true} ] end diff --git a/apps/remote_control/mix.exs b/apps/remote_control/mix.exs index 04847b1e9..970ea05bd 100644 --- a/apps/remote_control/mix.exs +++ b/apps/remote_control/mix.exs @@ -42,16 +42,15 @@ defmodule Lexical.RemoteControl.MixProject do defp deps do [ - {:benchee, "~> 1.1", only: :test}, + {:benchee, "~> 1.3", only: :test}, {:common, in_umbrella: true}, - {:elixir_sense, - github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, + {:elixir_sense, github: "elixir-lsp/elixir_sense", branch: "1.18"}, {:lexical_plugin, path: "../../projects/lexical_plugin"}, {:lexical_shared, path: "../../projects/lexical_shared"}, {:lexical_test, path: "../../projects/lexical_test", only: :test}, - {:patch, "~> 0.12", only: [:dev, :test], optional: true, runtime: false}, + {:patch, "~> 0.15", only: [:dev, :test], optional: true, runtime: false}, {:path_glob, "~> 0.2", optional: true}, - {:phoenix_live_view, "~> 0.19.5", only: [:test], optional: true, runtime: false}, + {:phoenix_live_view, "~> 1.0", only: [:test], optional: true, runtime: false}, {:snowflake, "~> 1.0"}, {:sourceror, "~> 1.4"} ] diff --git a/apps/server/mix.exs b/apps/server/mix.exs index 8ed43d673..843153fcc 100644 --- a/apps/server/mix.exs +++ b/apps/server/mix.exs @@ -43,11 +43,10 @@ defmodule Lexical.Server.MixProject do {:lexical_shared, path: "../../projects/lexical_shared", override: true}, {:lexical_test, path: "../../projects/lexical_test", only: [:dev, :test]}, {:common, in_umbrella: true}, - {:elixir_sense, - github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, + {:elixir_sense, github: "elixir-lsp/elixir_sense", branch: "1.18"}, {:jason, "~> 1.4"}, {:logger_file_backend, "~> 0.0.13", only: [:dev, :prod]}, - {:patch, "~> 0.12", runtime: false, only: [:dev, :test]}, + {:patch, "~> 0.15", runtime: false, only: [:dev, :test]}, {:path_glob, "~> 0.2"}, {:protocol, in_umbrella: true}, {:remote_control, in_umbrella: true, runtime: false}, diff --git a/mix.exs b/mix.exs index f58b4e584..5df1f2ac5 100644 --- a/mix.exs +++ b/mix.exs @@ -18,7 +18,7 @@ defmodule Lexical.LanguageServer.MixProject do defp deps do [ - {:ex_doc, "~> 0.29.4", only: :dev, runtime: false}, + {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:credo, "~> 1.7", only: [:dev, :test]}, {:lexical_credo, path: "projects/lexical_credo", only: [:dev, :test]}, Mix.Dialyzer.dependency() diff --git a/mix.lock b/mix.lock index 31bdc0cd9..7db423b33 100644 --- a/mix.lock +++ b/mix.lock @@ -1,36 +1,36 @@ %{ - "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, + "benchee": {:hex, :benchee, "1.3.1", "c786e6a76321121a44229dde3988fc772bca73ea75170a73fd5f4ddf1af95ccf", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "76224c58ea1d0391c8309a8ecbfe27d71062878f59bd41a390266bf4ac1cc56d"}, "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, - "castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"}, + "castore": {:hex, :castore, "1.0.10", "43bbeeac820f16c89f79721af1b3e092399b3a1ecc8df1a472738fd853574911", [:mix], [], "hexpm", "1b0b7ea14d889d9ea21202c43a4fa015eb913021cb535e8ed91946f4b77a8848"}, "credo": {:hex, :credo, "1.7.10", "6e64fe59be8da5e30a1b96273b247b5cf1cc9e336b5fd66302a64b25749ad44d", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "71fbc9a6b8be21d993deca85bf151df023a3097b01e09a2809d460348561d8cd"}, "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, "dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"}, - "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "0c98e656cf60d4b693376a2013a312039560b95d", [ref: "0c98e656cf60d4b693376a2013a312039560b95d"]}, + "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, + "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "3200aab84f8e74d71aa5dd6cefc6eef40941ed52", [branch: "1.18"]}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, - "ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [: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", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"}, + "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, "file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "logger_file_backend": {:hex, :logger_file_backend, "0.0.13", "df07b14970e9ac1f57362985d76e6f24e3e1ab05c248055b7d223976881977c2", [:mix], [], "hexpm", "71a453a7e6e899ae4549fb147b1c6621f4233f8f48f58ca10a64ec67b6c50018"}, - "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.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"}, - "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [: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", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, + "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "patch": {:hex, :patch, "0.12.0", "2da8967d382bade20344a3e89d618bfba563b12d4ac93955468e830777f816b0", [:mix], [], "hexpm", "ffd0e9a7f2ad5054f37af84067ee88b1ad337308a1cb227e181e3967127b0235"}, + "patch": {:hex, :patch, "0.15.0", "947dd6a8b24a2d2d1137721f20bb96a8feb4f83248e7b4ad88b4871d52807af5", [:mix], [], "hexpm", "e8dadf9b57b30e92f6b2b1ce2f7f57700d14c66d4ed56ee27777eb73fb77e58d"}, "path_glob": {:hex, :path_glob, "0.2.0", "b9e34b5045cac5ecb76ef1aa55281a52bf603bf7009002085de40958064ca312", [:mix], [{:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "be2594cb4553169a1a189f95193d910115f64f15f0d689454bb4e8cfae2e7ebc"}, - "phoenix": {:hex, :phoenix, "1.7.7", "4cc501d4d823015007ba3cdd9c41ecaaf2ffb619d6fb283199fa8ddba89191e0", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "8966e15c395e5e37591b6ed0bd2ae7f48e961f0f60ac4c733f9566b519453085"}, - "phoenix_html": {:hex, :phoenix_html, "3.3.2", "d6ce982c6d8247d2fc0defe625255c721fb8d5f1942c5ac051f6177bffa5973f", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "44adaf8e667c1c20fb9d284b6b0fa8dc7946ce29e81ce621860aa7e96de9a11d"}, - "phoenix_live_view": {:hex, :phoenix_live_view, "0.19.5", "6e730595e8e9b8c5da230a814e557768828fd8dfeeb90377d2d8dbb52d4ec00a", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b2eaa0dd3cfb9bd7fb949b88217df9f25aed915e986a28ad5c8a0d054e7ca9d3"}, + "phoenix": {:hex, :phoenix, "1.7.18", "5310c21443514be44ed93c422e15870aef254cf1b3619e4f91538e7529d2b2e4", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "1797fcc82108442a66f2c77a643a62980f342bfeb63d6c9a515ab8294870004e"}, + "phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.1", "5389a30658176c0de816636ce276567478bffd063c082515a6e8368b8fc9a0db", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c0f517e6f290f10dbb94343ac22e0109437fb1fa6f0696e7c73967b789c1c285"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, - "phoenix_template": {:hex, :phoenix_template, "1.0.3", "32de561eefcefa951aead30a1f94f1b5f0379bc9e340bb5c667f65f1edfa4326", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "16f4b6588a4152f3cc057b9d0c0ba7e82ee23afa65543da535313ad8d25d8e2c"}, - "plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, + "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, + "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, + "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, "snowflake": {:hex, :snowflake, "1.0.4", "8433b4e04fbed19272c55e1b7de0f7a1ee1230b3ae31a813b616fd6ef279e87a", [:mix], [], "hexpm", "badb07ebb089a5cff737738297513db3962760b10fe2b158ae3bebf0b4d5be13"}, "sourceror": {:hex, :sourceror, "1.4.0", "be87319b1579191e25464005d465713079b3fd7124a3938a1e6cf4def39735a9", [:mix], [], "hexpm", "16751ca55e3895f2228938b703ad399b0b27acfe288eff6c0e629ed3e6ec0358"}, "statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"}, - "stream_data": {:hex, :stream_data, "0.6.0", "e87a9a79d7ec23d10ff83eb025141ef4915eeb09d4491f79e52f2562b73e5f47", [:mix], [], "hexpm", "b92b5031b650ca480ced047578f1d57ea6dd563f5b57464ad274718c9c29501c"}, - "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "stream_data": {:hex, :stream_data, "1.1.2", "05499eaec0443349ff877aaabc6e194e82bda6799b9ce6aaa1aadac15a9fdb4d", [:mix], [], "hexpm", "129558d2c77cbc1eb2f4747acbbea79e181a5da51108457000020a906813a1a9"}, + "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, - "websock_adapter": {:hex, :websock_adapter, "0.5.4", "7af8408e7ed9d56578539594d1ee7d8461e2dd5c3f57b0f2a5352d610ddde757", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d2c238c79c52cbe223fcdae22ca0bb5007a735b9e933870e241fce66afb4f4ab"}, + "websock_adapter": {:hex, :websock_adapter, "0.5.8", "3b97dc94e407e2d1fc666b2fb9acf6be81a1798a2602294aac000260a7c4a47d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "315b9a1865552212b5f35140ad194e67ce31af45bcee443d4ecb96b5fd3f3782"}, } diff --git a/projects/lexical_credo/mix.exs b/projects/lexical_credo/mix.exs index a1e1979ab..b0a8187c8 100644 --- a/projects/lexical_credo/mix.exs +++ b/projects/lexical_credo/mix.exs @@ -33,7 +33,7 @@ defmodule LexicalCredo.MixProject do ), {:credo, "> 0.0.0", optional: true}, {:jason, "> 0.0.0", optional: true}, - {:ex_doc, "~> 0.29", optional: true, only: [:dev, :hex]} + {:ex_doc, "~> 0.34", optional: true, only: [:dev, :hex]} ] end diff --git a/projects/lexical_plugin/mix.exs b/projects/lexical_plugin/mix.exs index 6b2baaebb..c5164facc 100644 --- a/projects/lexical_plugin/mix.exs +++ b/projects/lexical_plugin/mix.exs @@ -24,8 +24,8 @@ defmodule Lexical.Plugin.MixProject do else: {:lexical_shared, path: "../lexical_shared"} ), env_dep( - hex: {:ex_doc, "~> 0.29", only: :hex, runtime: false}, - else: {:ex_doc, "~> 0.29", only: :dev, runtime: false} + hex: {:ex_doc, "~> 0.34", only: :hex, runtime: false}, + else: {:ex_doc, "~> 0.34", only: :dev, runtime: false} ), dialyzer_dep() ] diff --git a/projects/lexical_shared/mix.exs b/projects/lexical_shared/mix.exs index f74392cdf..8193deddb 100644 --- a/projects/lexical_shared/mix.exs +++ b/projects/lexical_shared/mix.exs @@ -27,9 +27,9 @@ defmodule Lexical.Shared.MixProject do defp deps do [ - {:stream_data, "~> 0.6", only: [:test], runtime: false}, - {:ex_doc, "~> 0.29", only: [:dev]}, - {:patch, "~> 0.12", runtime: false, only: [:dev, :test]}, + {:stream_data, "~> 1.1", only: [:test], runtime: false}, + {:ex_doc, "~> 0.34", only: [:dev]}, + {:patch, "~> 0.15", runtime: false, only: [:dev, :test]}, dialyzer_dep() ] end diff --git a/projects/lexical_shared/mix.lock b/projects/lexical_shared/mix.lock index 90de1a703..9a250fff4 100644 --- a/projects/lexical_shared/mix.lock +++ b/projects/lexical_shared/mix.lock @@ -1,12 +1,12 @@ %{ "dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, - "ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [: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", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"}, - "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.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"}, - "patch": {:hex, :patch, "0.12.0", "2da8967d382bade20344a3e89d618bfba563b12d4ac93955468e830777f816b0", [:mix], [], "hexpm", "ffd0e9a7f2ad5054f37af84067ee88b1ad337308a1cb227e181e3967127b0235"}, - "stream_data": {:hex, :stream_data, "0.6.0", "e87a9a79d7ec23d10ff83eb025141ef4915eeb09d4491f79e52f2562b73e5f47", [:mix], [], "hexpm", "b92b5031b650ca480ced047578f1d57ea6dd563f5b57464ad274718c9c29501c"}, + "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, + "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [: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", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "patch": {:hex, :patch, "0.15.0", "947dd6a8b24a2d2d1137721f20bb96a8feb4f83248e7b4ad88b4871d52807af5", [:mix], [], "hexpm", "e8dadf9b57b30e92f6b2b1ce2f7f57700d14c66d4ed56ee27777eb73fb77e58d"}, + "stream_data": {:hex, :stream_data, "1.1.2", "05499eaec0443349ff877aaabc6e194e82bda6799b9ce6aaa1aadac15a9fdb4d", [:mix], [], "hexpm", "129558d2c77cbc1eb2f4747acbbea79e181a5da51108457000020a906813a1a9"}, } From ec5aae9d21113d01e6345b604839c3324eecff49 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 14:37:55 -0800 Subject: [PATCH 05/15] [1.18] Add 1.18.1 to test matrix --- .github/workflows/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 398955528..629ce704e 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -154,9 +154,9 @@ jobs: # and running the workflow steps. matrix: include: - - elixir: "1.18" + - elixir: "1.18.1" otp: "27" - - elixir: "1.18" + - elixir: "1.18.1" otp: "26" - elixir: "1.17" otp: "27" From 6056f5e69a1956fd1536f4b8e634ee0cbbe24269 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 14:38:51 -0800 Subject: [PATCH 06/15] [1.18] Quieted compilation warnings --- apps/common/test/lexical/math_test.exs | 6 ++--- .../mix.tasks.deps.safe_compile.ex | 2 +- .../remote_control/build/error_test.exs | 27 +++++++++++++++---- apps/server/lib/lexical/server/task_queue.ex | 18 +++++-------- .../lib/lexical/document/lines.ex | 8 +++--- .../lexical_shared/test/lexical/text_test.exs | 4 +-- 6 files changed, 38 insertions(+), 27 deletions(-) diff --git a/apps/common/test/lexical/math_test.exs b/apps/common/test/lexical/math_test.exs index 3ed5c59d3..a87b21e12 100644 --- a/apps/common/test/lexical/math_test.exs +++ b/apps/common/test/lexical/math_test.exs @@ -28,10 +28,8 @@ defmodule Lexical.MathTest do end property "clamp works with all integers" do - check all( - ints <- uniq_list_of(integer(-100_000..100_000), min_length: 5, max_length: 20), - [low, mid, high] = low_mid_high(ints) - ) do + check all(ints <- uniq_list_of(integer(-100_000..100_000), min_length: 5, max_length: 20)) do + [low, mid, high] = low_mid_high(ints) assert Math.clamp(mid, low, high) == mid assert Math.clamp(low, mid, high) == mid assert Math.clamp(high, low, mid) == mid diff --git a/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex b/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex index 664463a3d..420674d74 100644 --- a/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex +++ b/apps/remote_control/lib/lexical/remote_control/mix.tasks.deps.safe_compile.ex @@ -1,4 +1,4 @@ -if not Elixir.Features.compile_keeps_current_directory?() do +unless Elixir.Features.compile_keeps_current_directory?() do defmodule Mix.Tasks.Deps.SafeCompile do use Mix.Task diff --git a/apps/remote_control/test/lexical/remote_control/build/error_test.exs b/apps/remote_control/test/lexical/remote_control/build/error_test.exs index e14ba8ffb..dd8d2f85d 100644 --- a/apps/remote_control/test/lexical/remote_control/build/error_test.exs +++ b/apps/remote_control/test/lexical/remote_control/build/error_test.exs @@ -315,19 +315,30 @@ defmodule Lexical.RemoteControl.Build.ErrorTest do end / - [func_diagnotic, b, a] = + diagnostics = document_text |> compile() |> diagnostics() + [func_diagnostic, b, a] = + case diagnostics do + [func_diagnostic, b, a] -> + [func_diagnostic, b, a] + + [b, a] -> + [nil, b, a] + end + assert a.message == ~s[undefined variable "a"] assert decorate(document_text, a.position) =~ "«a»" assert b.message == ~s[undefined variable "b"] assert decorate(document_text, b.position) =~ "«b»" - assert func_diagnotic.message == ~s[undefined function print/1] - assert decorate(document_text, func_diagnotic.position) =~ "«print»(:bar)" + if func_diagnostic do + assert func_diagnostic.message == ~s[undefined function print/1] + assert decorate(document_text, func_diagnostic.position) =~ "«print»(:bar)" + end end test "handles UndefinedError without moudle" do @@ -438,7 +449,10 @@ defmodule Lexical.RemoteControl.Build.ErrorTest do |> compile() |> diagnostic() - assert diagnostic.message =~ ~s[protocol Enumerable not implemented for 1 of type Integer] + # used a regex here because the error changed in elixir 1.18 + assert diagnostic.message =~ + ~r[protocol Enumerable not implemented for( 1 of)? type Integer] + assert decorate(document_text, diagnostic.position) =~ "«for i <- 1, do: i\n»" end @@ -452,7 +466,10 @@ defmodule Lexical.RemoteControl.Build.ErrorTest do |> compile() |> diagnostic() - assert diagnostic.message =~ ~s[protocol Enumerable not implemented for 1 of type Integer] + # used a regex here because the error changed in elixir 1.18 + assert diagnostic.message =~ + ~r[protocol Enumerable not implemented for( 1 of)? type Integer] + assert decorate(document_text, diagnostic.position) =~ "«for i <- 1, do: i\n»" end diff --git a/apps/server/lib/lexical/server/task_queue.ex b/apps/server/lib/lexical/server/task_queue.ex index c31f2d3ff..9ecb16710 100644 --- a/apps/server/lib/lexical/server/task_queue.ex +++ b/apps/server/lib/lexical/server/task_queue.ex @@ -138,19 +138,15 @@ defmodule Lexical.Server.TaskQueue do :ok end - defp log_task_run_time(%Task{} = task, result) do - case task do - %{started_at: ts, mfa: {m, f, a}} -> - elapsed = System.system_time(:microsecond) - ts + defp log_task_run_time(%{started_at: ts, mfa: {m, f, a}}, result) do + elapsed = System.system_time(:microsecond) - ts - Logger.warning( - "Task #{m}.#{f}/#{length(a)} ran for #{Lexical.Formats.time(elapsed)}. Result #{inspect(result)}" - ) - - _ -> - :ok - end + Logger.warning( + "Task #{m}.#{f}/#{length(a)} ran for #{Lexical.Formats.time(elapsed)}. Result #{inspect(result)}" + ) end + + defp log_task_run_time(_, _), do: :ok end use GenServer diff --git a/projects/lexical_shared/lib/lexical/document/lines.ex b/projects/lexical_shared/lib/lexical/document/lines.ex index 7fa33a70e..3008d6eec 100644 --- a/projects/lexical_shared/lib/lexical/document/lines.ex +++ b/projects/lexical_shared/lib/lexical/document/lines.ex @@ -146,15 +146,15 @@ defimpl Enumerable, for: Lexical.Document.Lines do end def slice(%Lines{} = document) do - {:ok, Lines.size(document), fn start, len -> do_slice(document, start, len) end} + {:ok, Lines.size(document), fn start, len, step -> do_slice(document, start, len, step) end} end - defp do_slice(%Lines{} = document, start, 1) do + defp do_slice(%Lines{} = document, start, 1, _) do [elem(document.lines, start)] end - defp do_slice(%Lines{} = document, start, length) do - Enum.map(start..(start + length - 1), &elem(document.lines, &1)) + defp do_slice(%Lines{} = document, start, length, step) do + Enum.map(start..(start + length - 1)//step, &elem(document.lines, &1)) end defp tuple_reduce(_, {:halt, acc}, _fun) do diff --git a/projects/lexical_shared/test/lexical/text_test.exs b/projects/lexical_shared/test/lexical/text_test.exs index 71ba58268..860f41b00 100644 --- a/projects/lexical_shared/test/lexical/text_test.exs +++ b/projects/lexical_shared/test/lexical/text_test.exs @@ -7,9 +7,9 @@ defmodule Lexical.TextTest do property "count_leading_spaces/1" do check all( maybe_spaces <- string([?\t, ?\s]), - string_base <- string(:printable), - maybe_with_leading_spaces = maybe_spaces <> string_base + string_base <- string(:printable) ) do + maybe_with_leading_spaces = maybe_spaces <> string_base space_count = byte_size(maybe_spaces) assert Text.count_leading_spaces(maybe_with_leading_spaces) == space_count end From d227ca869af12565590f7be8cd537a24b5c2e798 Mon Sep 17 00:00:00 2001 From: scohen Date: Fri, 27 Dec 2024 22:43:45 +0000 Subject: [PATCH 07/15] Update Nix hash of Mix deps --- nix/hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/hash b/nix/hash index 8e0c7bc14..7e63188d3 100644 --- a/nix/hash +++ b/nix/hash @@ -1 +1 @@ -sha256-/FHuLKlY9nposkulvMuIQ0NvvRI3q24Ionq/22jalOA= +sha256-1Yo5mefZ92q8b1dOD5pX56hEY2asJZS68ekS+65bagw= From 17374baf964f4df35f456c9cd56139b9918fdac3 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 15:29:50 -0800 Subject: [PATCH 08/15] [fix] Supported pre-1.14 slicing function --- projects/lexical_shared/lib/lexical/document/lines.ex | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/lexical_shared/lib/lexical/document/lines.ex b/projects/lexical_shared/lib/lexical/document/lines.ex index 3008d6eec..092459d71 100644 --- a/projects/lexical_shared/lib/lexical/document/lines.ex +++ b/projects/lexical_shared/lib/lexical/document/lines.ex @@ -146,7 +146,14 @@ defimpl Enumerable, for: Lexical.Document.Lines do end def slice(%Lines{} = document) do - {:ok, Lines.size(document), fn start, len, step -> do_slice(document, start, len, step) end} + slicing_function = + if Version.match?(System.version(), ">= 1.14.0") do + fn start, len, step -> do_slice(document, start, len, step) end + else + fn start, len -> do_slice(document, start, len, 1) end + end + + {:ok, Lines.size(document), slicing_function} end defp do_slice(%Lines{} = document, start, 1, _) do From b84e3689b9f545d756fce12f3b61f6219d7a0563 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 15:38:06 -0800 Subject: [PATCH 09/15] Downgraded elixir_sense --- apps/remote_control/mix.exs | 3 ++- apps/server/mix.exs | 3 ++- mix.lock | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/remote_control/mix.exs b/apps/remote_control/mix.exs index 970ea05bd..cfb67d173 100644 --- a/apps/remote_control/mix.exs +++ b/apps/remote_control/mix.exs @@ -44,7 +44,8 @@ defmodule Lexical.RemoteControl.MixProject do [ {:benchee, "~> 1.3", only: :test}, {:common, in_umbrella: true}, - {:elixir_sense, github: "elixir-lsp/elixir_sense", branch: "1.18"}, + {:elixir_sense, + github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, {:lexical_plugin, path: "../../projects/lexical_plugin"}, {:lexical_shared, path: "../../projects/lexical_shared"}, {:lexical_test, path: "../../projects/lexical_test", only: :test}, diff --git a/apps/server/mix.exs b/apps/server/mix.exs index 843153fcc..e0a572a32 100644 --- a/apps/server/mix.exs +++ b/apps/server/mix.exs @@ -43,7 +43,8 @@ defmodule Lexical.Server.MixProject do {:lexical_shared, path: "../../projects/lexical_shared", override: true}, {:lexical_test, path: "../../projects/lexical_test", only: [:dev, :test]}, {:common, in_umbrella: true}, - {:elixir_sense, github: "elixir-lsp/elixir_sense", branch: "1.18"}, + {:elixir_sense, + github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, {:jason, "~> 1.4"}, {:logger_file_backend, "~> 0.0.13", only: [:dev, :prod]}, {:patch, "~> 0.15", runtime: false, only: [:dev, :test]}, diff --git a/mix.lock b/mix.lock index 7db423b33..e99457b6d 100644 --- a/mix.lock +++ b/mix.lock @@ -6,7 +6,7 @@ "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, "dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"}, "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, - "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "3200aab84f8e74d71aa5dd6cefc6eef40941ed52", [branch: "1.18"]}, + "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "0c98e656cf60d4b693376a2013a312039560b95d", [ref: "0c98e656cf60d4b693376a2013a312039560b95d"]}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, "file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"}, From e213bd20f90b0e6d07cb57eb7a05fc57e4f364e2 Mon Sep 17 00:00:00 2001 From: scohen Date: Fri, 27 Dec 2024 23:39:31 +0000 Subject: [PATCH 10/15] Update Nix hash of Mix deps --- nix/hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/hash b/nix/hash index 7e63188d3..8e0c7bc14 100644 --- a/nix/hash +++ b/nix/hash @@ -1 +1 @@ -sha256-1Yo5mefZ92q8b1dOD5pX56hEY2asJZS68ekS+65bagw= +sha256-/FHuLKlY9nposkulvMuIQ0NvvRI3q24Ionq/22jalOA= From 9407536ffb84097e95cb43eb0616106318ea85f2 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 27 Dec 2024 16:50:05 -0800 Subject: [PATCH 11/15] Updatd all deps --- apps/common/mix.exs | 2 +- apps/remote_control/mix.exs | 2 +- apps/server/mix.exs | 4 ++-- mix.lock | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/common/mix.exs b/apps/common/mix.exs index 105e1d754..cefe29906 100644 --- a/apps/common/mix.exs +++ b/apps/common/mix.exs @@ -36,7 +36,7 @@ defmodule Common.MixProject do {:lexical_shared, path: "../../projects/lexical_shared"}, {:lexical_test, path: "../../projects/lexical_test", only: :test}, {:snowflake, "~> 1.0"}, - {:sourceror, "~> 1.4"}, + {:sourceror, "~> 1.7"}, {:stream_data, "~> 1.1", only: [:test], runtime: false}, {:patch, "~> 0.15", only: [:test], optional: true, runtime: false} ] diff --git a/apps/remote_control/mix.exs b/apps/remote_control/mix.exs index cfb67d173..034a820b4 100644 --- a/apps/remote_control/mix.exs +++ b/apps/remote_control/mix.exs @@ -53,7 +53,7 @@ defmodule Lexical.RemoteControl.MixProject do {:path_glob, "~> 0.2", optional: true}, {:phoenix_live_view, "~> 1.0", only: [:test], optional: true, runtime: false}, {:snowflake, "~> 1.0"}, - {:sourceror, "~> 1.4"} + {:sourceror, "~> 1.7"} ] end diff --git a/apps/server/mix.exs b/apps/server/mix.exs index e0a572a32..4dcf9dd1b 100644 --- a/apps/server/mix.exs +++ b/apps/server/mix.exs @@ -46,12 +46,12 @@ defmodule Lexical.Server.MixProject do {:elixir_sense, github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, {:jason, "~> 1.4"}, - {:logger_file_backend, "~> 0.0.13", only: [:dev, :prod]}, + {:logger_file_backend, "~> 0.0", only: [:dev, :prod]}, {:patch, "~> 0.15", runtime: false, only: [:dev, :test]}, {:path_glob, "~> 0.2"}, {:protocol, in_umbrella: true}, {:remote_control, in_umbrella: true, runtime: false}, - {:sourceror, "~> 1.4"} + {:sourceror, "~> 1.7"} ] end end diff --git a/mix.lock b/mix.lock index e99457b6d..e389a68b7 100644 --- a/mix.lock +++ b/mix.lock @@ -4,14 +4,14 @@ "castore": {:hex, :castore, "1.0.10", "43bbeeac820f16c89f79721af1b3e092399b3a1ecc8df1a472738fd853574911", [:mix], [], "hexpm", "1b0b7ea14d889d9ea21202c43a4fa015eb913021cb535e8ed91946f4b77a8848"}, "credo": {:hex, :credo, "1.7.10", "6e64fe59be8da5e30a1b96273b247b5cf1cc9e336b5fd66302a64b25749ad44d", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "71fbc9a6b8be21d993deca85bf151df023a3097b01e09a2809d460348561d8cd"}, "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, - "dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"}, + "dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "0c98e656cf60d4b693376a2013a312039560b95d", [ref: "0c98e656cf60d4b693376a2013a312039560b95d"]}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, "file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, - "logger_file_backend": {:hex, :logger_file_backend, "0.0.13", "df07b14970e9ac1f57362985d76e6f24e3e1ab05c248055b7d223976881977c2", [:mix], [], "hexpm", "71a453a7e6e899ae4549fb147b1c6621f4233f8f48f58ca10a64ec67b6c50018"}, + "logger_file_backend": {:hex, :logger_file_backend, "0.0.14", "774bb661f1c3fed51b624d2859180c01e386eb1273dc22de4f4a155ef749a602", [:mix], [], "hexpm", "071354a18196468f3904ef09413af20971d55164267427f6257b52cfba03f9e6"}, "makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"}, "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [: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", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, @@ -27,7 +27,7 @@ "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, "snowflake": {:hex, :snowflake, "1.0.4", "8433b4e04fbed19272c55e1b7de0f7a1ee1230b3ae31a813b616fd6ef279e87a", [:mix], [], "hexpm", "badb07ebb089a5cff737738297513db3962760b10fe2b158ae3bebf0b4d5be13"}, - "sourceror": {:hex, :sourceror, "1.4.0", "be87319b1579191e25464005d465713079b3fd7124a3938a1e6cf4def39735a9", [:mix], [], "hexpm", "16751ca55e3895f2228938b703ad399b0b27acfe288eff6c0e629ed3e6ec0358"}, + "sourceror": {:hex, :sourceror, "1.7.1", "599d78f4cc2be7d55c9c4fd0a8d772fd0478e3a50e726697c20d13d02aa056d4", [:mix], [], "hexpm", "cd6f268fe29fa00afbc535e215158680a0662b357dc784646d7dff28ac65a0fc"}, "statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"}, "stream_data": {:hex, :stream_data, "1.1.2", "05499eaec0443349ff877aaabc6e194e82bda6799b9ce6aaa1aadac15a9fdb4d", [:mix], [], "hexpm", "129558d2c77cbc1eb2f4747acbbea79e181a5da51108457000020a906813a1a9"}, "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, From c2bebf8ca0b3b2e0555229b68cf2ac253a0cbc9a Mon Sep 17 00:00:00 2001 From: scohen Date: Sat, 28 Dec 2024 00:51:31 +0000 Subject: [PATCH 12/15] Update Nix hash of Mix deps --- nix/hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/hash b/nix/hash index 8e0c7bc14..c3e2a3b9d 100644 --- a/nix/hash +++ b/nix/hash @@ -1 +1 @@ -sha256-/FHuLKlY9nposkulvMuIQ0NvvRI3q24Ionq/22jalOA= +sha256-DYBaRWEAoHdJtRe2B4EjTe+3XeJg4vzbuIlhnVg/+QE= From 8b6e92dc165957767171963b97dbcda3188a33b7 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Thu, 2 Jan 2025 18:14:18 -0800 Subject: [PATCH 13/15] Updated elixir_sense --- apps/remote_control/mix.exs | 2 +- apps/server/mix.exs | 2 +- mix.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remote_control/mix.exs b/apps/remote_control/mix.exs index 034a820b4..7fc356c21 100644 --- a/apps/remote_control/mix.exs +++ b/apps/remote_control/mix.exs @@ -45,7 +45,7 @@ defmodule Lexical.RemoteControl.MixProject do {:benchee, "~> 1.3", only: :test}, {:common, in_umbrella: true}, {:elixir_sense, - github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, + github: "elixir-lsp/elixir_sense", ref: "73ce7e0d239342fb9527d7ba567203e77dbb9b25"}, {:lexical_plugin, path: "../../projects/lexical_plugin"}, {:lexical_shared, path: "../../projects/lexical_shared"}, {:lexical_test, path: "../../projects/lexical_test", only: :test}, diff --git a/apps/server/mix.exs b/apps/server/mix.exs index 4dcf9dd1b..4d104b2e6 100644 --- a/apps/server/mix.exs +++ b/apps/server/mix.exs @@ -44,7 +44,7 @@ defmodule Lexical.Server.MixProject do {:lexical_test, path: "../../projects/lexical_test", only: [:dev, :test]}, {:common, in_umbrella: true}, {:elixir_sense, - github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"}, + github: "elixir-lsp/elixir_sense", ref: "73ce7e0d239342fb9527d7ba567203e77dbb9b25"}, {:jason, "~> 1.4"}, {:logger_file_backend, "~> 0.0", only: [:dev, :prod]}, {:patch, "~> 0.15", runtime: false, only: [:dev, :test]}, diff --git a/mix.lock b/mix.lock index e389a68b7..15aa2dc14 100644 --- a/mix.lock +++ b/mix.lock @@ -6,7 +6,7 @@ "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, "dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, - "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "0c98e656cf60d4b693376a2013a312039560b95d", [ref: "0c98e656cf60d4b693376a2013a312039560b95d"]}, + "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "73ce7e0d239342fb9527d7ba567203e77dbb9b25", [ref: "73ce7e0d239342fb9527d7ba567203e77dbb9b25"]}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, "file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"}, From 1430df4018dfe68bc96f02e920a4ff98cb91167a Mon Sep 17 00:00:00 2001 From: scohen Date: Fri, 3 Jan 2025 02:15:28 +0000 Subject: [PATCH 14/15] Update Nix hash of Mix deps --- nix/hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/hash b/nix/hash index c3e2a3b9d..813745ccc 100644 --- a/nix/hash +++ b/nix/hash @@ -1 +1 @@ -sha256-DYBaRWEAoHdJtRe2B4EjTe+3XeJg4vzbuIlhnVg/+QE= +sha256-i2IJ++lK1C/q+ETq/EYfNgGFKDTC/+boSwxAaT8rozw= From 8771ec21f1b537361b9705633dc8453430da225e Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Fri, 3 Jan 2025 09:42:35 -0800 Subject: [PATCH 15/15] disabled tests on versions not supported by elixir sense --- .../completion/translations/macro_test.exs | 79 ++++++++++--------- .../completion/translations/struct_test.exs | 29 ++++--- 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/apps/server/test/lexical/server/code_intelligence/completion/translations/macro_test.exs b/apps/server/test/lexical/server/code_intelligence/completion/translations/macro_test.exs index 57b991292..2cdd57002 100644 --- a/apps/server/test/lexical/server/code_intelligence/completion/translations/macro_test.exs +++ b/apps/server/test/lexical/server/code_intelligence/completion/translations/macro_test.exs @@ -846,8 +846,10 @@ defmodule Lexical.Server.CodeIntelligence.Completion.Translations.MacroTest do "macro_2_without_parens ${1:arg1}, ${2:arg2}, ${3:arg3}, ${4:arg4}" end - test "completes ExUnit macros without parens", %{project: project} do - source = ~q[ + if Version.match?(System.version(), ">= 1.15.0") do + # The update to elixir sense broke these tests + test "completes ExUnit macros without parens", %{project: project} do + source = ~q[ defmodule ExampleTest do use ExUnit.Case @@ -857,53 +859,54 @@ defmodule Lexical.Server.CodeIntelligence.Completion.Translations.MacroTest do end ] - assert {:ok, completion} = - project - |> complete(source) - |> fetch_completion("assert assertion") + assert {:ok, completion} = + project + |> complete(source) + |> fetch_completion("assert assertion") - assert completion.label == "assert assertion" - assert apply_completion(completion) =~ "assert ${1:assertion}" + assert completion.label == "assert assertion" + assert apply_completion(completion) =~ "assert ${1:assertion}" + end end - end - test "test completion snippets", %{project: project} do - assert {:ok, [stub, with_body, with_context | _ignored]} = - project - |> complete(inside_exunit_context("test|")) - |> fetch_completion("test ") + test "test completion snippets", %{project: project} do + assert {:ok, [stub, with_body, with_context | _ignored]} = + project + |> complete(inside_exunit_context("test|")) + |> fetch_completion("test ") - assert ~S(test "message" ) = stub.label - assert "A stub test" = stub.detail - assert :snippet = stub.insert_text_format - assert apply_completion(stub) == inside_exunit_context("test \"${0:message}\"") + assert ~S(test "message" ) = stub.label + assert "A stub test" = stub.detail + assert :snippet = stub.insert_text_format + assert apply_completion(stub) == inside_exunit_context("test \"${0:message}\"") - assert ~S(test "message" do... ) = with_body.label - assert "A test" = with_body.detail - assert :snippet = with_body.insert_text_format + assert ~S(test "message" do... ) = with_body.label + assert "A test" = with_body.detail + assert :snippet = with_body.insert_text_format - assert apply_completion(with_body) == - inside_exunit_context("test \"${1:message}\" do\n $0\nend") + assert apply_completion(with_body) == + inside_exunit_context("test \"${1:message}\" do\n $0\nend") - assert ~S(test "message", %{} do...) = with_context.label - assert "A test that receives context" = with_context.detail - assert :snippet = with_context.insert_text_format + assert ~S(test "message", %{} do...) = with_context.label + assert "A test that receives context" = with_context.detail + assert :snippet = with_context.insert_text_format - assert apply_completion(with_context) == - inside_exunit_context("test \"${1:message}\", %{${2:context}} do\n $0\nend") - end + assert apply_completion(with_context) == + inside_exunit_context("test \"${1:message}\", %{${2:context}} do\n $0\nend") + end - test "describe blocks", %{project: project} do - assert {:ok, describe} = - project - |> complete(inside_exunit_context("descr|")) - |> fetch_completion("describe ") + test "describe blocks", %{project: project} do + assert {:ok, describe} = + project + |> complete(inside_exunit_context("descr|")) + |> fetch_completion("describe ") - assert describe.label == "describe \"message\"" - assert describe.insert_text_format == :snippet + assert describe.label == "describe \"message\"" + assert describe.insert_text_format == :snippet - assert apply_completion(describe) == - inside_exunit_context("describe \"${1:message}\" do\n $0\nend") + assert apply_completion(describe) == + inside_exunit_context("describe \"${1:message}\" do\n $0\nend") + end end describe "syntax macros" do diff --git a/apps/server/test/lexical/server/code_intelligence/completion/translations/struct_test.exs b/apps/server/test/lexical/server/code_intelligence/completion/translations/struct_test.exs index fde62753e..327b64dea 100644 --- a/apps/server/test/lexical/server/code_intelligence/completion/translations/struct_test.exs +++ b/apps/server/test/lexical/server/code_intelligence/completion/translations/struct_test.exs @@ -87,44 +87,49 @@ defmodule Lexical.Server.CodeIntelligence.Completion.Translations.StructTest do assert apply_completion(completion) == expected end - test "should complete module aliases after %", %{project: project} do - source = ~q[ + if Version.match?(System.version(), ">= 1.15.0") do + # The elixir sense upgrade caused these tests to fail. + test "should complete module aliases after %", %{project: project} do + source = ~q[ defmodule TestModule do alias Project.Structs.User def my_function(%Us|) ] - expected = ~q[ + expected = ~q[ defmodule TestModule do alias Project.Structs.User def my_function(%User{$1}) ] - assert [completion] = complete(project, source) + assert [completion] = complete(project, source) - assert completion.kind == :struct - assert apply_completion(completion) == expected - end + assert completion.kind == :struct + assert apply_completion(completion) == expected + end - test "should complete, but not add curlies when last word not contains %", %{project: project} do - source = ~q[ + test "should complete, but not add curlies when last word not contains %", %{ + project: project + } do + source = ~q[ defmodule TestModule do alias Project.Structs.User Us| ] - assert [completion] = complete(project, source) - assert completion.kind == :module + assert [completion] = complete(project, source) + assert completion.kind == :module - assert apply_completion(completion) == ~q[ + assert apply_completion(completion) == ~q[ defmodule TestModule do alias Project.Structs.User User ] + end end test "should complete non-aliased correctly", %{project: project} do