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

Already on GitHub? Sign in to your account

Fix rebar_base_compiler:format_errors/3 for errors in include files #265

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

legoscia commented Jul 9, 2012

Handle the case where the error didn't occur in the file being
compiled. That is, instead of:

/path/to/foo.erl:9: type foo() already defined

print something like:

In file included from /path/to/foo.erl:
/path/to/bar.hrl:9: type foo() already defined

@tuncer tuncer was assigned Jul 14, 2012

Contributor

tuncer commented Jul 31, 2012

Thanks for catching the bug. To avoid diverging from erlc's reporting format
let's omit the In file included line and print the following instead:

/path/to/bar.hrl:9: type foo() already defined
Contributor

dizzyd commented Oct 21, 2012

I agree with @tuncer, I like the fix except for the "In file included from..." bit.

@legoscia legoscia Fix rebar_base_compiler:format_errors/3 for errors in include files
Handle the case where the error didn't occur in the file being
compiled.  That is, if there is an error on line 9 of bar.hrl,
instead of:

/path/to/foo.erl:9: type foo() already defined

print:

/path/to/bar.hrl:9: type foo() already defined
872e7ed
Contributor

legoscia commented Oct 22, 2012

Sorry about the delay, this fell to the bottom of my todo pile... Here's a new patch, without the extra line.

Contributor

tuncer commented Oct 22, 2012

Thanks, merged.

@tuncer tuncer closed this Oct 22, 2012

@mattsta mattsta pushed a commit to mattsta/rebar that referenced this pull request Jun 21, 2014

Jared Morrow Merge pull request #265 from goofansu/fix-qc-help-clean
Fix 'rebar help clean' function_clause error
8edaa08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment