-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ftp: fix types in ftp module #6545
ftp: fix types in ftp module #6545
Conversation
CT Test Results 2 files 13 suites 5m 35s ⏱️ Results for commit 8122362. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
9407e3d
to
47d2683
Compare
Branch name and comments are misleading as you also change inets files! |
71d4dad
to
227be9e
Compare
Thanks for the feedback. I am updating two modules and will close this PR and create the appropriate one with a better branch name. I would like to get feedback regarding the changes, if we think that those guards make sense.
From my point of view:
|
227be9e
to
a9a8ab9
Compare
7e82162
to
809b452
Compare
I have remove the parts that dealt with the inets module to be in its own PR (#6661 ) |
8892e05
to
b91fc18
Compare
b91fc18
to
5ccc7ad
Compare
b6e1a0e
to
bc72a44
Compare
Please let me know if this is a viable solution or if we need to find another way. Alternatives:
|
I think that this solution feels good. I do not think that for example then commit |
bc72a44
to
8de8903
Compare
Thanks for the feedback. I have placed everything in two commits.
|
8de8903
to
27d1ea3
Compare
Generates the types in the documentation of `ftp` from the source code. Before this change, the documentation was hard-coded in `ftp.xml`.
removes some type information from module `ftp.erl` because this information should not be needed by users of `ftp`. before this change, users of `ftp` module knew that if they get an error as follows `{error, Reason}`, `Reason` was a specific atom(), i.e., `Reason :: 'ehost' | ...`. users of `ftp` should not rely on the internal atom used, since they are expected to call `ftp:formaterror/1` to understand the reason behind the error, as in any other OTP app. however, this type information can be useful to maintainers of OTP. Thus, `ftp.erl` contains the necessary type information for users of the ftp application. the new module `ftp_internal.erl` has been introduced and contains the actual implementation of the functions from `ftp.erl`, so that `ftp.erl` is now a simple wrapper around `ftp_internal.erl`. `ftp_internal.erl` contains the more precise error types for the type variable `Reason` and also contains the implementation of the `ftp` functions.
27d1ea3
to
8122362
Compare
Fixes some type specs from the ftp module. These have been validated by eqWAlizer.