gleam-lang / gleam

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

Crash when attempting to run eunit #716

Closed lpil closed 4 years ago

lpil commented 4 years ago
louis ~/src/gleam/gleam (main) ✘ $ export GLEAM_LOG=trace
louis ~/src/gleam/gleam (main) $ gleam eunit test/build_with_gleam/
 TRACE Reading file "test/build_with_gleam/gleam.toml"
  INFO Copying root package to _build
 TRACE Deleting directory "test/build_with_gleam/_build/default/lib/bob"
 TRACE Creating directory "test/build_with_gleam/_build/default/lib/bob"
 TRACE Copying file "test/build_with_gleam/gleam.toml" to "test/build_with_gleam/_build/default/lib/bob/gleam.toml"
 TRACE Copying directory "test/build_with_gleam/src" to "test/build_with_gleam/_build/default/lib/bob"
 TRACE Copying directory "test/build_with_gleam/test" to "test/build_with_gleam/_build/default/lib/bob"
  INFO Reading package configs from _build
 TRACE Reading directory "test/build_with_gleam/_build/default/lib"
 TRACE Reading file "test/build_with_gleam/_build/default/lib/gleam_helper/gleam.toml"
 TRACE Reading file "test/build_with_gleam/_build/default/lib/gleam_otp/gleam.toml"
 TRACE Reading file "test/build_with_gleam/_build/default/lib/gleam_stdlib/gleam.toml"
 TRACE Reading file "test/build_with_gleam/_build/default/lib/bob/gleam.toml"
  INFO Compiling packages
  INFO load{package="gleam_helper" origin=Src}: Reading source code
 TRACE load{package="gleam_helper" origin=Src}: Reading file "test/build_with_gleam/_build/default/lib/gleam_helper/src/helper/one.gleam"
 TRACE load{package="gleam_helper" origin=Src}: Reading file "test/build_with_gleam/_build/default/lib/gleam_helper/src/helper/two.gleam"
Compiling gleam_helper
  INFO compile{package="gleam_helper"}: Parsing source code
  INFO compile{package="gleam_helper"}: Type checking modules
 TRACE compile{package="gleam_helper"}: Type checking module="helper/one"
 TRACE compile{package="gleam_helper"}: Type checking module="helper/two"
  INFO compile{package="gleam_helper"}: Generating Erlang source code
 TRACE compile{package="gleam_helper"}: Generated Erlang module name="helper@one.erl"
 TRACE compile{package="gleam_helper"}: Generated Erlang module name="helper@two.erl"
  INFO load{package="gleam_stdlib" origin=Src}: Reading source code
Compiling gleam_stdlib
  INFO compile{package="gleam_stdlib"}: Parsing source code
  INFO compile{package="gleam_stdlib"}: Type checking modules
  INFO compile{package="gleam_stdlib"}: Generating Erlang source code
  INFO load{package="gleam_otp" origin=Src}: Reading source code
Compiling gleam_otp
  INFO compile{package="gleam_otp"}: Parsing source code
  INFO compile{package="gleam_otp"}: Type checking modules
  INFO compile{package="gleam_otp"}: Generating Erlang source code
  INFO load{package="bob" origin=Src}: Reading source code
 TRACE load{package="bob" origin=Src}: Reading file "test/build_with_gleam/_build/default/lib/bob/src/bob.gleam"
  INFO load{package="bob" origin=Test}: Reading source code
 TRACE load{package="bob" origin=Test}: Reading file "test/build_with_gleam/_build/default/lib/bob/test/bob_test.gleam"
Compiling bob
  INFO compile{package="bob"}: Parsing source code
  INFO compile{package="bob"}: Type checking modules
 TRACE compile{package="bob"}: Type checking module="bob_test"
 TRACE compile{package="bob"}: Type checking module="bob"
  INFO compile{package="bob"}: Generating Erlang source code
 TRACE compile{package="bob"}: Generated Erlang module name="bob_test.erl"
 TRACE compile{package="bob"}: Generated Erlang header name="bob_Box.hrl"
 TRACE compile{package="bob"}: Generated Erlang module name="bob.erl"
  INFO Writing generated Erlang source code to disc
 TRACE Writing file "test/build_with_gleam/_build/default/lib/gleam_stdlib/ebin/gleam_stdlib.app"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/gleam_otp/ebin/gleam_otp.app"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/bob/test/bob_test.erl"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/bob/src/bob_Box.hrl"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/bob/src/bob.erl"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/bob/ebin/bob.app"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/gleam_helper/src/helper@one.erl"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/gleam_helper/src/helper@two.erl"
 TRACE Writing file "test/build_with_gleam/_build/default/lib/gleam_helper/ebin/gleam_helper.app"
  INFO Compiling Erlang source code to BEAM bytecode
Compiling Erlang code
 TRACE Writing file "test/build_with_gleam/_build/compile_escript.erl"
 TRACE Running OS process "escript" "test/build_with_gleam/_build/compile_escript.erl" "test/build_with_gleam/_build"
  Running eunit
 TRACE Writing file "test/build_with_gleam/_build/eunit_progress.erl"
 TRACE Writing file "test/build_with_gleam/_build/eunit_runner.erl"
 TRACE Running OS process "erlc" "-o" "test/build_with_gleam/_build" "test/build_with_gleam/_build/eunit_progress.erl"
 TRACE Reading directory "test/build_with_gleam/_build/default/lib"
 TRACE Running OS process "escript" "test/build_with_gleam/_build/eunit_runner.erl" "test/build_with_gleam/_build/default/lib/gleam_helper/ebin,test/build_with_gleam/_build/default/lib/gleam_otp/ebin,test/build_with_gleam/_build/default/lib/gleam_stdlib/ebin,test/build_with_gleam/_build/default/lib/bob/ebin" "bob_test"
escript: exception error: no match of right hand side value {error,bad_directory}
  in function  eunit_runner_erl__escript__1594__320429__911612__9:main/1 (test/build_with_gleam/_build/eunit_runner.erl, line 6)
  in call from escript:run/2 (escript.erl, line 758)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
 ERROR Failed error=ShellCommand { command: "escript", err: None }

error: Shell command failure

There was a problem when running the shell command `escript`.
louis ~/src/gleam/gleam (main) ✘ $
thehabbos007 commented 4 years ago

Oh, seems like the eunit_runner i put together wasn't quite robust enough. Will look into this :)

lpil commented 4 years ago

Thank you! Let me know if there's something I can do to help, it may be a quirk of my machine

On Fri, 10 Jul 2020, 20:07 Ahmad Sattar, notifications@github.com wrote:

Oh, seems like the eunit_runner i put together wasn't quite robust enough. Will look into this :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gleam-lang/gleam/issues/716#issuecomment-656841452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOZVBWZV6DYIPHAJ65JX53R25RI5ANCNFSM4OV4C5XA .