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

Fix error reports on missing include paths #921

Merged
merged 1 commit into from Nov 14, 2015

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Nov 14, 2015

In some cases (nested includes?) paths end up in such a way that joining
them breaks up and hard-crashes rebar3. This patch specifically handles
this scenario to fix things by avoiding passing empty lists to
filename:join.

fixes #914.

I'm not sure how exactly to reproduce for tests. I showed it is fixed it by using https://github.com/rabbitmq/rabbitmq-erlang-client :

→ rebar3 compile
===> Verifying dependencies...
===> Compiling amqp_client
===> Compiling /home/ferd/code/experiment/rabbitmq-erlang-client/_build/default/lib/amqp_client/src/amqp_gen_consumer.erl failed
/home/ferd/code/experiment/rabbitmq-erlang-client/_build/default/lib/amqp_client/include/amqp_client.hrl:20: can't find include lib "rabbit_common/include/rabbit.hrl"
/home/ferd/code/experiment/rabbitmq-erlang-client/_build/default/lib/amqp_client/include/amqp_client.hrl:21: can't find include lib "rabbit_common/include/rabbit_framing.hrl"
...

In some cases (nested includes?) paths end up in such a way that joining
them breaks up and hard-crashes rebar3. This patch specifically handles
this scenario to fix things by avoiding passing empty lists to
filename:join.
@tsloughter
Copy link
Collaborator

Ah, good fix.

tsloughter added a commit that referenced this pull request Nov 14, 2015
Fix error reports on missing include paths
@tsloughter tsloughter merged commit c8b58d9 into erlang:master Nov 14, 2015
@ferd ferd deleted the fix-includes branch November 14, 2015 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message if include_lib doesn't exist
2 participants