From d983beafe93a0f58272d3351f12329984541878f Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Wed, 16 Oct 2013 19:48:00 -0400 Subject: Don't over-aggressively clean the code path in the presence of lib_dir directives Rebar, when it encounters a lib_dir directive, caches the current code path, adds the libdir(s) and returns the cached copy of the path. When rebar has finished processing that directory, it restores the cached path. This is problematic in the below scenario: /(lib_dir)->G A -> B -> C -> D -> E \-> F -> D -> E When rebar is finished processing B, it restores the code path to what it was before it processed B, removing C, D, E and G from the code path. This means when it comes to process F, neither D or E are in the code path, so any header includes, rebar plugins or parse transforms will not be in the code path. Without the lib_dir directive, rebar does no code path cleanups, so everything works fine. This change makes rebar only remove the explicit lib_dir code paths it added and adds an inttest that replicates the above scenario. --- inttest/tdeps3/f.hrl | 1 + 1 file changed, 1 insertion(+) create mode 100644 inttest/tdeps3/f.hrl (limited to 'inttest/tdeps3/f.hrl') diff --git a/inttest/tdeps3/f.hrl b/inttest/tdeps3/f.hrl new file mode 100644 index 0000000..02f8088 --- /dev/null +++ b/inttest/tdeps3/f.hrl @@ -0,0 +1 @@ +-include_lib("e/include/e.hrl"). -- cgit v1.1