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

Changing behaviours breaks recompilation #18

Open
filmor opened this issue Feb 21, 2018 · 3 comments
Open

Changing behaviours breaks recompilation #18

filmor opened this issue Feb 21, 2018 · 3 comments

Comments

@filmor
Copy link

filmor commented Feb 21, 2018

The Erlang compiler apparently always uses the loaded Mod:behaviour_info/1 to check whether a module implements the given behaviour. If it is changed, compiled modules will still be checked against the previous version of the behaviour and the compilation will either fail or (worse) go through even though the modules don't actually implement the new behaviour.

It's probably enough to forcibly unload modules that have a behaviour_info and are to be recompiled.

@filmor filmor changed the title Modules containing behaviours must be loaded even if the whole compilation failed Changing behaviours breaks recompilation Feb 21, 2018
@vans163
Copy link
Owner

vans163 commented Aug 15, 2020

rebar_agent:do(compile) is used, if this happens this is a problem with rebar itself.

@filmor
Copy link
Author

filmor commented Aug 15, 2020

The problem doesn't happen with r3:do(compile). on a rebar shell, though.

@vans163
Copy link
Owner

vans163 commented Jan 6, 2024

Give this a new try please, I have released v0.5.1 which uses r3:do(compile) instead of rebar3_agent:do(compile)

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

No branches or pull requests

2 participants