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 eunit" doesn't reload .hrl files for files in test/ #1998

Closed
antonbobkov opened this issue Jan 17, 2019 · 0 comments · Fixed by #2012
Closed

"rebar3 eunit" doesn't reload .hrl files for files in test/ #1998

antonbobkov opened this issue Jan 17, 2019 · 0 comments · Fixed by #2012
Labels
minor bug bug that does not prevent major features from working

Comments

@antonbobkov
Copy link

Environment

Rebar3 report
 version 3.8.0
 generated at 2019-01-17T23:44:00+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: rebar3
Entered as:
  rebar3 eunit
-----------------
Operating System: x86_64-pc-linux-gnu
ERTS: Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [kernel-poll:false]
Root Directory: /usr/lib/erlang
Library directory: /usr/lib/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.6.0
certifi: 2.3.1
cf: 0.2.2
common_test: 1.15.3
compiler: 7.1.4
crypto: 4.2
cth_readable: 1.4.2
dialyzer: 3.2.3
edoc: 0.9.2
erlware_commons: 1.3.1
eunit: 2.3.5
eunit_formatters: 0.5.0
getopt: 1.0.1
hex_core: 0.4.0
hipe: 3.17
inets: 6.4.5
kernel: 5.4.1
providers: 1.7.0
public_key: 1.5.2
relx: 3.28.0
sasl: 3.1.1
snmp: 5.2.9
ssl_verify_fun: 1.1.3
stdlib: 3.4.3
syntax_tools: 2.1.4
tools: 2.11.1

-----------------
Escript path: undefined
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report repos shell state tar tree unlock update upgrade upgrade upgrade version xref

I have created a minimal project to reproduce the bug here https://github.com/antonbobkov/rebar3_record_bug

Current behaviour

I have a record inside an .hrl file that is included in all my .erl files in both src/ and test/ directories.
When I modify the record in that .hrl file and run rebar3 eunit it seems that only my src/*.erl files are recompiled with the updated record information, but test/*.erl files keep old record information.
That usually results in an error.

If I delete _build folder rm -rf _build and rerun rebar eunit then there are no errors.

Expected behaviour

rebar eunit should recompile test/*.erl files when only an .hrl file is modified (with no other changes).

@ferd ferd added the minor bug bug that does not prevent major features from working label Feb 1, 2019
@ferd ferd closed this as completed in #2012 Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor bug bug that does not prevent major features from working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants