Skip to content

Commit

Permalink
Return current nif version from download_or_reuse_nif (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Mar 10, 2024
1 parent e5305fd commit 1235bd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/elixir_make/artefact.ex
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ defmodule ElixirMake.Artefact do

case List.keyfind(available_urls, target_at_nif_version, 0) do
{^target_at_nif_version, download_url} ->
{:ok, current_target, download_url}
{:ok, current_target, nif_version_to_use, download_url}

nil ->
available_targets = Enum.map(available_urls, fn {target, _url} -> target end)
Expand Down
4 changes: 2 additions & 2 deletions lib/mix/tasks/compile.elixir_make.ex
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ defmodule Mix.Tasks.Compile.ElixirMake do
nif_version = "#{:erlang.system_info(:nif_version)}"

case Artefact.current_target_url(config, precompiler, nif_version) do
{:ok, target, url} ->
archived_fullpath = Artefact.archive_path(config, target, nif_version)
{:ok, target, nif_version_to_use, url} ->
archived_fullpath = Artefact.archive_path(config, target, nif_version_to_use)

unless File.exists?(archived_fullpath) do
Mix.shell().info("Downloading precompiled NIF to #{archived_fullpath}")
Expand Down

0 comments on commit 1235bd3

Please sign in to comment.