gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.42k stars 723 forks source link

problem when running the shell command `rebar3` - when running `gleam run` #3225

Closed morucci closed 3 months ago

morucci commented 3 months ago

Using gleam compiled from c2a6660134db8b72f4b398df7a82e5a9e393d25d and rebar3 installed from Fedora 40 package (rebar3 --version: rebar 3.22.0 on Erlang/OTP 26 Erts 14.2.5)

When creating gleam project and adding the thoas dependency:

fbo@fbo-laptop:~/git/github.com/gleam-lang$ gleam new repro
Your Gleam project repro has been successfully created.
The project can be compiled and tested by running these commands:

        cd repro
        gleam test

fbo@fbo-laptop:~/git/github.com/gleam-lang$ cd repro
fbo@fbo-laptop:~/git/github.com/gleam-lang/repro$ gleam run
  Resolving versions
Downloading packages
 Downloaded 2 packages in 0.01s
  Compiling gleam_stdlib
  Compiling gleeunit
  Compiling repro
   Compiled in 0.85s
    Running repro.main
Hello from repro!
fbo@fbo-laptop:~/git/github.com/gleam-lang/repro$ gleam add thoas
  Resolving versions
Downloading packages
 Downloaded 1 package in 0.00s
      Added thoas v1.2.1
fbo@fbo-laptop:~/git/github.com/gleam-lang/repro$ gleam run
  Compiling thoas
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
error: Shell command failure

There was a problem when running the shell command `rebar3`.

fbo@fbo-laptop:~/git/github.com/gleam-lang/repro$ DIAGNOSTIC=1 gleam run
  Compiling thoas
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: function_clause
===> Stack trace to the error location:
[{rebar_plugins,'-discover_plugins/2-fun-0-',
                [rebar3_ex_doc],
                [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar_plugins.erl"},
                 {line,191}]},
 {lists,filtermap_1,2,[{file,"lists.erl"},{line,1661}]},
 {rebar_plugins,discover_plugins,2,
                [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar_plugins.erl"},
                 {line,191}]},
 {rebar_plugins,handle_plugins,4,
                [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar_plugins.erl"},
                 {line,98}]},
 {lists,foldl,3,[{file,"lists.erl"},{line,1594}]},
 {rebar_plugins,project_plugins_install,1,
                [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar_plugins.erl"},
                 {line,24}]},
 {rebar3,run_aux,2,
         [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar3.erl"},
          {line,180}]},
 {rebar3,main,1,
         [{file,"/builddir/build/BUILD/rebar3-3.22.0/apps/rebar/src/rebar3.erl"},
          {line,66}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
error: Shell command failure

There was a problem when running the shell command `rebar3`.
morucci commented 3 months ago

Using the pre-built version from the rebar3 project - version 3.23.0 fixes the issue.