Comments (16)
How did I know that was what was missing?
===> Uncaught error: undef
===> Stack trace to the error location:
[{erl_syntax,type,[{attribute,2,module,telemetry_sup}],[]},
Error you got is saying function erl_syntax:type/4
is undefined. So my best guess was that it likely was because the whole module wasn't there and that usually ends up being because of distro packages.
from telemetry.
The path is just the escript having been built on my machine. Only older rebar3 versions were built that way, so you should upgrade your rebar3. Though I think mix forces you to use their version and I don't know when they last upgraded the one they will install.
Can you describe the issue more? Your title says "flaky", do you mean it doesn't always happen?
from telemetry.
This error happens from time to time on our CI. Clearing build cache helps.
from telemetry.
It would happen if a .erl
files is somehow not readable. That line it is on is simply opening a source file in read mode.
I doubt it changes anything but it would still be nice if you could switch to using the latest rebar3, 3.13.0.
This issue recently has only come up from people using mix
as far as I can tell, which is on an old version of rebar3.
from telemetry.
I used the following command as a workaround:
MIX_REBAR3=`which rebar3` MIX_ENV=dev mix deps.compile telemetry
For sure, you should have newer version of rebar3
be installed in the system
from telemetry.
I hit this in my Gitlab CI builds using mix as well - the mix version of rebar3 was indeed older (3.6.3 I believe?). I used rebar3 local upgrade
to get 3.13, and the issue went away.
For others curious, here is the Gitlab .gitlab-ci-yml
line I added:
default:
image: "hexpm/elixir:1.10.2-erlang-22.2.8-alpine-3.11.3"
before_script:
- mix local.rebar --force && mix local.hex --force
- ~/.mix/rebar3 local upgrade && cp ~/.cache/rebar3/bin/rebar3 ~/.mix/rebar3 && ~/.mix/rebar3 --version
from telemetry.
Mix has upgraded the rebar3 it installs so I think this can be closed.
from telemetry.
Hi everyone, sorry if it's not correct to add this is on a closed issue, but I've followed all the suggestions and still not able to compile telemetry.
root@ceac44765919:~# elixir --version
Erlang/OTP 21 [erts-10.2.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Elixir 1.7.4 (compiled with Erlang/OTP 21)
root@ceac44765919:~# /root/.mix/rebar3 version
rebar 3.13.2 on Erlang/OTP 21 Erts 10.2.4
root@ceac44765919:~# DEBUG=1 mix deps.compile telemetry
===> Expanded command sequence to be run: []
===> Provider: {default,do}
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Provider: {default,app_discovery}
===> Provider: {bare,compile}
===> Compiling telemetry
===> run_hooks("/root/deps/telemetry", pre_hooks, compile) -> no hooks defined
===> run_hooks("/root/deps/telemetry", pre_hooks, erlc_compile) -> no hooks defined
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: undef
===> Stack trace to the error location:
[{erl_syntax,type,[{attribute,2,module,telemetry_sup}],[]},
{rebar_compiler_erl,parse_attrs,3,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler_erl.erl"},
{line,250}]},
{rebar_compiler_erl,dependencies,3,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler_erl.erl"},
{line,81}]},
{rebar_compiler,modify_dag,6,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler.erl"},
{line,368}]},
{rebar_compiler,'-update_dag_fun/3-fun-0-',5,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler.erl"},
{line,380}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{rebar_compiler,init_dag,7,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler.erl"},
{line,274}]},
{rebar_compiler,run,3,
[{file,"/tmp/cirrus-ci-build/src/rebar_compiler.erl"},
{line,77}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :telemetry, "/root/.mix/rebar3 bare compile --paths "/root/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"
Any insights?
from telemetry.
@pacoguzman how did you install Erlang/Elixir? If you pull up an Erlang shell what does syntax_tools:module_info().
give you? Or :syntax_tools.module_info()
in Elixir shell.
from telemetry.
That is not available in our installation
Interactive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :syntax_tools.module_info()
** (UndefinedFunctionError) function :syntax_tools.module_info/0 is undefined (module :syntax_tools is not available)
:syntax_tools.module_info()
We got a clean debian image and install using available packages
RUN apt-get --no-install-recommends -yqq install \
# ....
elixir \
erlang-crypto \
erlang-inets \
erlang-dev \
erlang-parsetools \
# ....
So I guess we missed some extra package, isn't it?
from telemetry.
After installing erlang-syntax-tools
it's working fine. So thanks for point to it.
from telemetry.
Good. And yea, it is best not to use debian packages. I wish they didn't provide them at all because they cause so many problems.
from telemetry.
Yes, this image is close to be removed and we'll follow another approach which won't use packages. How do you know that was a requirement?
from telemetry.
I want to note that I'm seeing the same error with an ASDF installation. Not sure if there's anything funky with my setup because I'd expect this to be more commonly reported if it's affecting all ASDF installations. Reported it on asdf-erlang: asdf-vm/asdf-erlang#155
from telemetry.
@axelson are you positive you are using the asdf installed Erlang and not a linux distro installed version? To be sure uninstall any distro package for erlang you might also have.
from telemetry.
I am positive that I am using the asdf installed Erlang since I which erl
returns ~/.asdf/shims/erl
and iex
prints Erlang/OTP 22
when I have set asdf to 22.3.4.1.
However I did have the erlang-23.0-1 package (arch linux) installed. However, after removing it I still get the same error when trying to access :syntax_tools
:
console session
jason@jdesktop /t/erl-test2> asdf local erlang 22.3.4.1
jason@jdesktop /t/erl-test2> asdf local elixir 1.10.3-otp-22
jason@jdesktop /t/erl-test2> iex
Erlang/OTP 22 [erts-10.7.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :syntax_tools.module_info()
** (UndefinedFunctionError) function :syntax_tools.module_info/0 is undefined (module :syntax_tools is not available)
:syntax_tools.module_info()
iex(1)>
BREAK: (a)bort (A)bort with dump (c)ontinue (p)roc info (i)nfo
(l)oaded (v)ersion (k)ill (D)b-tables (d)istribution
^Cā
jason@jdesktop /t/erl-test2> sudo pacman -R erlang
[sudo] password for jason:
checking dependencies...
Packages (1) erlang-23.0-1
Total Removed Size: 106.26 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing erlang [#######################################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
jason@jdesktop /t/erl-test2> iex
Erlang/OTP 22 [erts-10.7.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :syntax_tools.module_info()
** (UndefinedFunctionError) function :syntax_tools.module_info/0 is undefined (module :syntax_tools is not available)
:syntax_tools.module_info()
from telemetry.
Related Issues (20)
- Can't start app in Mix release {:bad_return, {{:telemetry_app, :start... HOT 10
- Making execution order of handlers guaranteed HOT 16
- `:telemetry.span/3` documentation seems inconsistent HOT 4
- Is telemetry distributed ? HOT 2
- Automatically detach when attaching process ends HOT 1
- Using telemetry as a dependency in an Elixir script HOT 11
- Support a debug mode and capture unhandled events in debug mode HOT 2
- Safe ETS interactions HOT 6
- Errors in readme HOT 4
- Static API for discovering events HOT 28
- Add telemetry:span/3 HOT 67
- Guidance around monotonic times HOT 5
- Nested payload for measurement? HOT 1
- Release 0.4.2 HOT 3
- What's the difference with gen_event? HOT 1
- Shall we release 1.0? HOT 5
- span needs to pass context to the stop event HOT 16
- span/3 StartMetadata and StopMetadata semantics HOT 1
- telemetry.beam failed: :badfile HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telemetry.