-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Exporting useful gen_server types #2690
Conversation
It is based on gen:emgr_name/0; the definition has been copied, the same way it is done for gen_server:server_ref/0 (which is identical to gen:server_ref/0).
Also check potentially related #2375. |
Why is this marked as stalled? |
Has there been any progress in the decision process regarding exporting these types ? I was really hoping to get them for OTP 24, but I'm starting to believe it will not be the case. This PR was open nine months ago. The diff is less than 10 lines long. Being able to write accurate function specifications is important both for correctness (with Dialyzer) and for code documentation (this is quite obvious in lots of Erlang modules where the lack of type specifications hinders readability). Lots of standard Erlang modules do not export types (starting with The |
The problem is not in the principal but in the legacy. Just exporting the existing types without afterthought might cause unforeseen problems. And alas these kind of decisions needs coordination and possible involvement of may different people and alas takes a lot of time. |
I have a lot of respect for the focus of the OTP team on stability and robustness which where qualities that brought me to Erlang in the first place. I'm however concerned by what seems to be the almost complete impossibility to move forward on various issues without delays going from several months to multiple years (I still hope for improvements in Dializer, one can dream :)). When I look at this very PR or at others from various authors, it feels to me that trying to contribute is a waste of time and that I should invest my energy in building alternatives to OTP and various components of the standard library, just because I would be actually able to update them. Hopefully this will improve with time :) |
I am sorry you feel that way. I do not think you are wasting your time. A lot of these PR coming in actually helps put focus on the problem. It is not always the number of lines changed that makes it easy or not to accept a PR. However our ways of working is constantly reviewed to make things better for everyone, so @KennethL I suppose we need to think of if we can improve the Open Source experience in cases such as this. |
Slow accepting of PRs forces developers to bypass direct and reliable solutions, my opinion may not be heard or may not be supported but active participation in reviews from the OTP team could only improve the quality and improve the community. Eg PR #4775 was provided few hours ago and fix real issue for few products at the same time, but nobody does not focus on this and there is a high probability that the PR |
@IngelaAndin thank you for acknowledging this. Feel free to contact me if I can help clarify things regarding this PR, I'll be happy to help. @vkatsuba to be fair, you cannot except any open source project to react to a PR in 13 hours, unless you start paying for this kind of support. |
It is only a few lines but the debate around this dates back many years, perhaps even a decade. You don't solve a debate this long by submitting a 5 lines PR. Personally the PR looks fine, except I have no idea why the
The OTP team has deadlines like everyone. Currently the focus is on getting OTP-24 done. They also have customers to support. And it's a small team considering the size of the product. It's not adequate to expect blazing fast reviews considering all this.
They likely already spend more time than that on average. |
Request ids are used to identify call requests; they are used when a process needs to reply asynchronously using
I agree; the idea what to introduce a minimal change to see how it goes, before going crazy with big changes which cause unexpected issues down the way. |
@galdor One of the issues with exporting type spec for some of the functions is that it might document some things more precisely than we want it to because it should be sort of opaque, but not necessarily completely opaque as we might want to be able to match it for equality. Once we document something it is really hard to change so that is why we are cautious. We will try to address these issues but alas the OTP-24.0 time frame is too tight. But that said it does not mean we have to wait for OTP-25. |
@vkatsuba We do follow up on PR weekly. The problem is that we maintain a fairly large codebase for the number of people involved and parts that are not so actively developed will always take more time to investigate and can not always receive top priority. |
Closed in favor of #5751 |
Following an email on the erlang-questions mailing list, I'm opening this PR to discuss the possibility of exporting these types.
I believe adding these will avoid duplicate and error prone copy/pasting when writing type specifications for functions which spawn gen_server processes, or refer to them.