kellymclaughlin / rebar3-eqc-plugin

A rebar3 plugin to enable the execution of Erlang QuickCheck properties
Apache License 2.0
13 stars 20 forks source link

Library can't be included as plugin on non EQC enabled machine? #18

Open cmeiklejohn opened 8 years ago

cmeiklejohn commented 8 years ago
===> Compiling rebar3_eqc
===> Compiling /home/travis/build/lasp-lang/lasp/_build/default/plugins/rebar3_eqc/src/rebar3_eqc.erl failed
/home/travis/build/lasp-lang/lasp/_build/default/plugins/rebar3_eqc/src/rebar3_eqc.erl:12: can't find include lib "eqc/include/eqc.hrl"
/home/travis/build/lasp-lang/lasp/_build/default/plugins/rebar3_eqc/src/rebar3_eqc.erl:156: function on_output/2 undefined
/home/travis/build/lasp-lang/lasp/_build/default/plugins/rebar3_eqc/src/rebar3_eqc.erl:165: function on_output/2 undefined

Is there a recommended way to do this?

Licenser commented 8 years ago

That makes sense to me, usually the eqc plugin should live in a own profile. i.e. in the eqc profile, that way it only gets loaded when that profile is used (wich it shouldn't on non eqc machines)

cmeiklejohn commented 8 years ago

Two points here:

  1. Not sure I agree. Why can't the plugin use ifdef's to prevent this?
  2. If I put this as part of a profile, it doesn't run the tests. I can reproduce this on two different repositories. Are you doing something special?
kellymclaughlin commented 8 years ago

I've had those errors before when I didn't have eqc installed, but it didn't affect building the rest of the project. Is there a negative effect other than the error output from the plugin that you're seeing and trying to work around?

cmeiklejohn commented 8 years ago

You're right, that's not causing the build to fail. I am still wondering why it's not picking up the test suites when moved to a profile's plugin list.

kellymclaughlin commented 8 years ago

Did you try ./rebar3 as eqc eqc after moving the plugin to the eqc profile? That seems to work for me.