-
Notifications
You must be signed in to change notification settings - Fork 29
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 incorrect depdencies (RIAK-2128) #24
base: develop
Are you sure you want to change the base?
Conversation
Why add |
I must be reading the wrong version of the README file because I don't have that reference to being "a progressive enhancement avenue". Which branch is that on? In general it is not good for one application to rely on others to bring in applications. My rationale is that if we forget that we should check for lager being present then we will not detect a problem before runtime, so we have to remember that in the function get_limits/0 (https://github.com/basho/cluster_info/blob/develop/src/cluster_info.erl#L331) we check if lager is present before doing calls and then remember to do check again. If we want to keep the dynamic behaviour I think we should change the check https://github.com/basho/cluster_info/blob/develop/src/cluster_info.erl#L334 to: case is_application_running(lager) of
...
is_application_running(App) ->
lists:keymember(App, 1, application:which_applications()). If lager is merely loaded then |
@lehoff, I totally agree that reworking the check to use I totally +1 your suggested change in the check though! That shape would allow for other progressive enhancements depending on the applications running in the VM without having to make them strict dependencies. |
Just reread your comment after posting mine, and realized that you might be talking about a build target that included lager for testing purposes, in which case, I can agree to that as well. My goal is to make sure that any additional dependencies are absolutely essential to the core functionality, able to be configured in or out at build time with no assumptions being made about their presence in any particular end product (all calls would need to be guarded). I can certainly see a benefit to having a way to include the applications for eunit testing the "enhanced" behaviors. |
My opinions, as the original author but no longer sole maintainer.
|
There is one major problem with use-if-present: it totally ruins OTP releases when it comes to upgrades and downgrades. A secondary problem is that dependency management issues is then something that happens at runtime. If the installed version of an use-if-present app does not work with the code written then there will be no alarm bells going off before runtime. And using lager in cluster_info would not force users of cluster_info to use lager in the rest of their application. We get edown in through the backdoor in numerous of our dependencies as it is today. |
Just had a very good discussion with @angrycub about Given that cluster_info is a forensic type of application it would be better if we moved We could create a This would make the use-if-present behaviour a natural thing to have.
And having
If this idea gets traction this issue/PR should be ignored and then we should have a Jira issue describing the refactoring of the cinfo files into their own app. |
Hi, Torben & Charlie, sorry about the delay. Your proposal sounds fine with me, 👍 |
Maybe I'm not understanding, I thought the value of having the cinfo files If somebody made fooapp that used riak_core+foo then would they need to The hidden node stuff sounds safer, anything that runs node-side via RPC is On Mon, Aug 31, 2015 at 2:38 PM Torben Hoffmann [email protected]
|
Done for 2.1.1 but should work for all Riak versions.