Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebar3 ct fails on my system (but not on Travis) #251

Closed
yurrriq opened this issue Jul 15, 2016 · 1 comment · Fixed by #252 or #253
Closed

rebar3 ct fails on my system (but not on Travis) #251

yurrriq opened this issue Jul 15, 2016 · 1 comment · Fixed by #252 or #253

Comments

@yurrriq
Copy link
Contributor

yurrriq commented Jul 15, 2016

===> Compiling lfe

src/lfe_qlc.erl:35: Warning: variable 'Opts' is unused

src/lfe_ms.erl:302: Warning: function fetch_binding/2 is unused

src/lfe_macro.erl:625: Warning: function trim_stacktrace/1 is unused
src/lfe_macro.erl:1025: Warning: variable 'V' shadowed in 'fun'

src/lfe_eval.erl:128: Warning: variable 'M' shadowed in 'fun'
src/lfe_eval.erl:132: Warning: variable 'M' shadowed in 'fun'
src/lfe_eval.erl:469: Warning: function init_letrec_env/1 is unused
src/lfe_eval.erl:475: Warning: function extend_letrec_env/3 is unused
src/lfe_eval.erl:475: Warning: variable 'Fbs0' is unused
src/lfe_eval.erl:744: Warning: variable 'M' shadowed in 'fun'
src/lfe_eval.erl:748: Warning: variable 'M' shadowed in 'fun'

src/lfe_edlin_expand.erl:228: Warning: function over_non_symbol/3 is unused

src/lfe_codegen.erl:851: Warning: variable 'St' shadowed in 'fun'
src/lfe_codegen.erl:974: Warning: variable 'St' shadowed in 'fun'
src/lfe_codegen.erl:981: Warning: variable 'St' shadowed in 'fun'
src/lfe_codegen.erl:986: Warning: variable 'St' shadowed in 'fun'

===> Running Common Test suites...

/Applications/Xcode.app/Contents/Developer/usr/bin/make  erlc-lfec
make[1]: Nothing to be done for `erlc-lfec'.
test/andor_SUITE.lfe:94: Warning: this clause cannot match because of different types/sizes
test/andor_SUITE.lfe:94: Warning: this clause cannot match because a previous clause always matches
test/andor_SUITE.lfe:102: Warning: this clause cannot match because of different types/sizes
test/guard_SUITE.lfe:765: unbound symbol: guard_SUITE
test/guard_SUITE.lfe:765: unbound symbol: all
test/guard_SUITE.lfe:765: unbound function: #(function 3)
test/guard_SUITE.lfe:765: unbound symbol: guard_SUITE
test/guard_SUITE.lfe:765: unbound symbol: all
test/guard_SUITE.lfe:765: unbound function: #(function 3)
===> Hook for ct failed!

It seems to be upset about the switch from fun to function. If I switch back, then all the tests pass again.

patch

diff --git a/test/guard_SUITE.lfe b/test/guard_SUITE.lfe
index 33b1344..e77d916 100644
--- a/test/guard_SUITE.lfe
+++ b/test/guard_SUITE.lfe
@@ -764,9 +764,9 @@

 (defun is_function_2
   ([config] (when (is_list config))
-   (line (test-pat 'true (is_function (id (function guard_SUITE all 1)) 1)))
+   (line (test-pat 'true (is_function (id (fun guard_SUITE all 1)) 1)))
    (line (test-pat 'true (is_function (id (lambda () 'ok)) 0)))
-   (line (test-pat 'false (is_function (id (function guard_SUITE all 1)) 0)))
+   (line (test-pat 'false (is_function (id (fun guard_SUITE all 1)) 0)))
    (line (test-pat 'false (is_function (id (lambda () 'ok)) 1)))

    (let ((F (lambda (_) 'ok)))

Any idea what's going on here? I'm on Erlang 18.3.4, built using this Nix package, on macOS 10.11.5.

@rvirding
Copy link
Member

rvirding commented Jul 15, 2016

That is weird. You seem to have got the latest test suites but are not running the latest version of the compiler and rest of the system. Are you sure your lfe and lfec commands are pointing to this version of lfe? rebar3 uses lfec which needs lfe.

This should be fixed.

yurrriq added a commit to yurrriq/lfe that referenced this issue Jul 16, 2016
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version
of LFE installed on the system, which in my case is often incorrect.

Close lfe#251
yurrriq added a commit to yurrriq/lfe that referenced this issue Jul 16, 2016
This should help avoid confusion related to lfe#251 in the future.
yurrriq added a commit to yurrriq/lfe that referenced this issue Jul 16, 2016
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version of
`lfe` installed on the system, which in my case is often incorrect.

Add a `compile` `post_hook` to compile `src/*.lfe` and output the beams
to the correct directory (as per `$REBAR_DEPS_DIR`). Remove the
redundant `make` in the `ct` `pre_hooks` and use `$REBAR_DEPS_DIR`
instead of the hard-coded `_build/test/lib`.

Remove `./bin` from `$PATH` in `.travis.yml` to avoid similar confusion
in the future.

Use `$REBAR_DEPS_DIR` in `bin/lfe` when set, otherwise fall back to
`./_build/default/{deps,lib}` as before.

Close lfe#251
yurrriq added a commit to yurrriq/lfe that referenced this issue Jul 16, 2016
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version of
`lfe` installed on the system, which in my case is often incorrect.

Add a `compile` `post_hook` to compile `src/*.lfe` and output the beams
to the correct directory (as per `$REBAR_DEPS_DIR`). Remove the
redundant `make` in the `ct` `pre_hooks` and use `$REBAR_DEPS_DIR`
instead of the hard-coded `_build/test/lib`.

Remove `./bin` from `$PATH` in `.travis.yml` to avoid similar confusion
in the future.

Use `$REBAR_DEPS_DIR` in `bin/lfe` when set, otherwise fall back to
`./_build/default/{deps,lib}` as before.

Close lfe#251
yurrriq added a commit to yurrriq/lfe that referenced this issue Jul 16, 2016
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version of
`lfe` installed on the system, which in my case is often incorrect.

Add a `compile` `post_hook` to compile `src/*.lfe` and output the beams
to the correct directory (as per `$REBAR_DEPS_DIR`). Remove the
redundant `make` in the `ct` `pre_hooks` and use `$REBAR_DEPS_DIR`
instead of the hard-coded `_build/test/lib`.

Remove `./bin` from `$PATH` in `.travis.yml` to avoid similar confusion
in the future.

Use `$REBAR_DEPS_DIR` in `bin/lfe` when set, otherwise fall back to
`./_build/default/{deps,lib}` as before.

Close lfe#251
oubiwann pushed a commit that referenced this issue Jul 26, 2020
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version of
`lfe` installed on the system, which in my case is often incorrect.

Add a `compile` `post_hook` to compile `src/*.lfe` and output the beams
to the correct directory (as per `$REBAR_DEPS_DIR`). Remove the
redundant `make` in the `ct` `pre_hooks` and use `$REBAR_DEPS_DIR`
instead of the hard-coded `_build/test/lib`.

Remove `./bin` from `$PATH` in `.travis.yml` to avoid similar confusion
in the future.

Use `$REBAR_DEPS_DIR` in `bin/lfe` when set, otherwise fall back to
`./_build/default/{deps,lib}` as before.

Close #251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants