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 a small bug in the MIB compiler when building dependencies #948

Merged
merged 2 commits into from
Dec 1, 2015

Conversation

toland
Copy link
Contributor

@toland toland commented Nov 30, 2015

When compiling a dependency with a MIB file the generated hrl file is left in the root project directory in a file called "include". This has the perverse effect of messing up the search path for include files causing any dependencies with files in their "include" directory to fail to build after that.

When compiling a dependency with a MIB file the generated hrl file is left in
the root project directory in a file called "include". This has the perverse
effect of messing up the search path for include files causing any dependencies
with files in their "include" directory to fail to build after that.
toland pushed a commit to hippware/wocky that referenced this pull request Nov 30, 2015
...by including a patched version of rebar3. There was a small bug in rebar3 when compiling dependencies with MIBs.

A PR has been opened with the rebar3 project to fix this long-term: erlang/rebar3#948
@ferd
Copy link
Collaborator

ferd commented Dec 1, 2015

+1. Any chance a test could be added for this?

@toland
Copy link
Contributor Author

toland commented Dec 1, 2015

Sure. I will do that and update the PR.

@toland
Copy link
Contributor Author

toland commented Dec 1, 2015

OK, I updated the tests and verified that the old code fails and the new code passes.

@talentdeficit
Copy link
Contributor

related to #909 maybe?

ferd added a commit that referenced this pull request Dec 1, 2015
Fix a small bug in the MIB compiler when building dependencies
@ferd ferd merged commit 46181c8 into erlang:master Dec 1, 2015
@ferd
Copy link
Collaborator

ferd commented Dec 1, 2015

Thanks for the contribution!

@talentdeficit yeah they seem related.

@talentdeficit
Copy link
Contributor

i'll investigate whether we still need #909 now that this is merged

toland pushed a commit to hippware/wocky that referenced this pull request Dec 2, 2015
...by including a patched version of rebar3. There was a small bug in rebar3 when compiling dependencies with MIBs.

A PR has been opened with the rebar3 project to fix this long-term: erlang/rebar3#948
@goertzenator
Copy link

This PR does subsume 909, however there's a problem with this one: the MIB includes are being placed in the wrong directory.

This PR places the MIB includes into priv/mib/include, whereas rebar2 and erlang.mk places them in the application include directory. IMO this should be corrected to fall in line with that precedent.

Details:

  1. This function in rebar2 show the cleaning out of generated MIB includes from include.
  2. erlang.mk does the same because I use it and the MIB includes definitely land in include.
  3. I couldn't find any OTP documentation that explicitly specifies where the MIB includes are supposed to go. I think everyone just assumes include.

@talentdeficit
Copy link
Contributor

ok. if rebar3 and erlang.mk both agree it should go in include i will try to ensure it is present there

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.

4 participants