The following code has been called:
I have also tried to recreate arguments passed to this function based on authors images and what I found on my machine:
dep = %Mix.Dep{
scm: Hex.SCM,
app: :telemetry,
requirement: "~> 0.4 or ~> 1.0",
status: {:ok, "1.3.0"},
opts: [
app_properties: [
description: ~c"Dynamic dispatching library for metrics and instrumentations",
vsn: ~c"1.3.0",
registered: [],
mod: {:telemetry_app, []},
applications: [:kernel, :stdlib],
env: [],
modules: [
:telemetry,
:telemetry_app,
:telemetry_handler_table,
:telemetry_sup,
:telemetry_test
],
licenses: [~c"Apache-2.0"],
links: [{~c"GitHub", ~c"https://github.com/beam-telemetry/telemetry"}],
doc: ~c"doc",
include_files: [~c"mix.exs"]
],
lock:
{:hex, :telemetry, "1.3.0",
"fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm",
"7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
env: :prod,
build: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/telemetry",
dest: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/deps/telemetry",
hex: "telemetry",
repo: "hexpm",
optional: false
],
deps: [],
top_level: false,
extra: [
erl_opts: [:debug_info],
deps: [],
profiles: [
test: [
erl_opts: [:nowarn_export_all],
ct_opts: [ct_hooks: [:cth_surefire]],
cover_enabled: true,
cover_opts: [:verbose],
plugins: [:covertool],
covertool: [coverdata_files: [~c"ct.coverdata"]]
]
],
shell: [apps: [:telemetry]],
xref_checks: [
:undefined_function_calls,
:undefined_functions,
:locals_not_used,
:deprecated_function_calls,
:deprecated_functions
],
project_plugins: [:rebar3_hex, :rebar3_ex_doc],
hex: [doc: %{provider: :ex_doc}],
ex_doc: [
source_url: "https://github.com/beam-telemetry/telemetry",
extras: ["README.md", "CHANGELOG.md", "LICENSE", "NOTICE"],
main: "readme"
],
overrides: []
],
manager: :rebar3,
from: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/deps/bandit/mix.exs",
system_env: []
}
config = [
consolidate_protocols: false,
consolidation_path: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/example/consolidated",
deps_path: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/deps",
deps_build_path: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev",
lockfile: "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/mix.lock",
build_embedded: false,
build_per_environment: true
]
command = ~s[escript.exe "c:/Users/pedro/.mix/elixir/1-17/rebar3" bare compile --paths c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/*/ebin]
print_app? = false
env = [
{"REBAR_BARE_COMPILER_OUTPUT_DIR", "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/telemetry"},
{"REBAR_CONFIG", "c:/Users/pedro/Desktop/Coding/Elixir/zaworld/_build/dev/lib/telemetry/mix.rebar.config"},
{"REBAR_PROFILE", "prod"},
{"TERM", "dumb"}
]
Note: Pay attention that some of those values may be a bit different, but most of them if not all should be exactly the same as what author’s have.
As we can see the escript.exe return code is different than 0 which means it failed. However looks like there is not much info what exactly have failed.
@SunPoke04 Are you able to clone the Elixir repo, switch to v1.17.3, modify code as shown below, compile and run mix compile with updated code?
Please wrap System.shell/2 call at the bottom of the function with IO.inspect/1 call, for example:
# …
{_, status} = IO.inspect(System.shell(command, options))
# or
{_, status} = System.shell(command, options) |> IO.inspect()
# or
{message, status} = System.shell(command, options)
IO.puts(message)
# …
As long as the code runs we do not care about if it’s nice or not. What we may be interested here is first tuple element i.e. error message coming from escript.exe which as you can see is unfortunately silenced.
Edit: Created a related issue:
Edit 2: This is going to be even more interesting … Looks like there is no issue with printing output (as it’s done using :into option) which would mean that escript.exe have failed with non-zero exit status and did not print any message. Unless there is a way everyone can reproduce, it would be a very hard to debug.
I have created a post on Erlang Forums, see:
@SunPoke04 How about checking if escript.exe have all dependencies installed? In Linux this could be done with ldd command, but I have no idea about Windows. Consider checking topics like:






















