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

Delegate functions calls instead of using macros #24

Merged
merged 3 commits into from Oct 10, 2018
Merged

Delegate functions calls instead of using macros #24

merged 3 commits into from Oct 10, 2018

Conversation

hauleth
Copy link
Contributor

@hauleth hauleth commented Oct 10, 2018

This is semi-breaking change as the behaviour should stay the same, but the calling form will be different, from macros to functions.

Closes #23

This is semi-breaking change as the behaviour should stay the same, but
the calling form will be different, from macros to functions.
@hauleth hauleth changed the title WIP: Delegate functions calls instead of using macros Delegate functions calls instead of using macros Oct 10, 2018
@deadtrickster deadtrickster merged commit b1b6a5e into deadtrickster:master Oct 10, 2018
@deadtrickster
Copy link
Owner

very nice Kernel.Utils.defdelegate, thanks

@hauleth hauleth deleted the use-functions-instead-of-macros branch October 10, 2018 15:13
@halostatue
Copy link

This seems to break Prometheus.Registry.register_collector(:prometheus_process_collector), requiring the explicit call of Prometheus.Registry.register_collector(:default, :prometheus_process_collector).

warning: function Prometheus.Registry.register_collector/1 is undefined or private. Did you mean one of:

      * "MACRO-deregister_collector"/2
      * "MACRO-register_collector"/2
      * "MACRO-register_collector"/3
      * "MACRO-register_collectors"/2
      * "MACRO-register_collectors"/3

@halostatue
Copy link

Actually, I’m not sure that’s the case. I’m not sure if you’ve pushed this one live yet, but I’m getting this now even with both arguments.

@hauleth
Copy link
Contributor Author

hauleth commented Oct 11, 2018

@halostatue it seems that you are using released version, not HEAD as it explicitly says that there are still macros there. Actually this PR will make your code work as is. To fix it using released version you need to add require Prometheus.Registry somewhere in your module.

@halostatue
Copy link

Makes sense. I’ll do that until the released version is updated. Thanks.

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

4 participants