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

Drop plugins from rebar.config when using rebar2 #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bastien-fieldbox
Copy link

This patch is intended to be able to use this library with rebar2.
This error happened when running rebar get-deps.

WARN: Remote origin url is Cloning into 'prometheus'... Uncaught error in rebar_core: {'EXIT', {function_clause, [{code,which, [{rebar3_archive_plugin,"0.0.1"}], [{file,"code.erl"},{line,724}]}, {rebar_core,'-plugin_modules/3-lc$^0/1-0-', 1, [{file,"src/rebar_core.erl"},{line,570}]}, {rebar_core,plugin_modules,3, [{file,"src/rebar_core.erl"},{line,570}]}, {rebar_core,process_dir1,7, [{file,"src/rebar_core.erl"},{line,241}]}, {rebar_core,process_each,5, [{file,"src/rebar_core.erl"},{line,348}]}, {rebar_core,process_dir1,7, [{file,"src/rebar_core.erl"},{line,268}]}, {rebar_core,process_each,5, [{file,"src/rebar_core.erl"},{line,348}]}, {rebar_core,process_dir1,7, [{file,"src/rebar_core.erl"},{line,250}]}]}}

Regards

@bastien-fieldbox
Copy link
Author

bastien-fieldbox commented Feb 14, 2020

oops I pushed some local changes when trying to sign commit. reverted, sorry for the mess I don't understand all this new stuff on github.

Fun fact: if rebar2 see a .proto it will assume there is a protobuffs_compile module.

Copy link
Collaborator

@essen essen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't try but the change looks fine.

Maybe squash the commits though, or cherry-pick when merging.

@essen
Copy link
Collaborator

essen commented Feb 14, 2020

Fun fact: if rebar2 see a .proto it will assume there is a protobuffs_compile module.

Perhaps the .proto files can be removed from the config.script as well.

@deadtrickster
Copy link
Owner

Protofiles used to generate the datamodel

@essen
Copy link
Collaborator

essen commented Feb 14, 2020

Yeah but they're not necessary to build and use prometheus.erl since the built Erlang files are also in the repository so removing them while doing a rebar2 build is fine. In Erlang.mk's case it simply ignores the .proto files, but since rebar2 isn't maintained I guess removing during rebar.config.script execution is the best solution.

@bastien-fieldbox bastien-fieldbox force-pushed the rebar2-compat branch 4 times, most recently from 4f4e53c to e6a3207 Compare February 17, 2020 12:55
@bastien-fieldbox
Copy link
Author

So I am unconfortable to have a rebar.config.script that actually delete some source files.
What do you guys suggest? Maybe I could add the protobuff lib if rebar2?

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.

None yet

3 participants