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

Kuba/ssh/doc fixes/otp 19335 #9021

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Conversation

u3s
Copy link
Contributor

@u3s u3s commented Nov 5, 2024

No description provided.

@u3s u3s added the team:PS Assigned to OTP team PS label Nov 5, 2024
@u3s u3s self-assigned this Nov 5, 2024
@u3s u3s requested a review from IngelaAndin November 5, 2024 14:25
Copy link
Contributor

github-actions bot commented Nov 5, 2024

CT Test Results

    2 files     29 suites   18m 36s ⏱️
  462 tests   458 ✅  4 💤 0 ❌
1 667 runs  1 643 ✅ 24 💤 0 ❌

Results for commit d23db60.

♻️ 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

@u3s u3s requested review from IngelaAndin and removed request for IngelaAndin November 5, 2024 14:31
@u3s u3s force-pushed the kuba/ssh/doc_fixes/OTP-19335 branch from b79ff14 to 243b6dd Compare November 5, 2024 14:41
@IngelaAndin
Copy link
Contributor

My spontaneous question is why do we have a lot types in an .hrl file? I think the types belong in the API module if they are types used in the API. If they are internal types they would probably also belong to some module handling that part of the system rather than and .hrl file. I know this was not your design, I am just questioning if we should keep it when we are improving things.

@u3s
Copy link
Contributor Author

u3s commented Nov 12, 2024

My spontaneous question is why do we have a lot types in an .hrl file? I think the types belong in the API module if they are types used in the API. If they are internal types they would probably also belong to some module handling that part of the system rather than and .hrl file. I know this was not your design, I am just questioning if we should keep it when we are improving things.

Yes. I wondered as well. I guess one can think of pros of this approach:

  • less type code in module implementation file (better argument before docs were included in source)
  • not all types from src/*.hrl needs to be exported. some of them might be used as local inside ssh modules ... for example role()

Do you think it is worth to take them out from hrl file? I have no strong opinion.

@IngelaAndin
Copy link
Contributor

You do not have to export all types for a module. Only the ones used by the API. I think having it in an .hrl file hides errors that could otherwise be caught. Maybe some of the types does not need to be types at all. Old documentation promoted making lots of subtypes.

@u3s
Copy link
Contributor Author

u3s commented Nov 13, 2024

You do not have to export all types for a module. Only the ones used by the API.

but can you internally share type between ssh modules without exporting type out from ssh?

I think having it in an .hrl file hides errors that could otherwise be caught. Maybe some of the types does not need to be types at all. Old documentation promoted making lots of subtypes.

I will have a 2nd look on this.

@IngelaAndin
Copy link
Contributor

You do not have to export all types for a module. Only the ones used by the API.

but can you internally share type between ssh modules without exporting type out from ssh?

The you can put them in a none API module that make sense and export them from there just as we have functions
in non API modules exported for the applications internal use.

I think having it in an .hrl file hides errors that could otherwise be caught. Maybe some of the types does not need to be types at all. Old documentation promoted making lots of subtypes.

I will have a 2nd look on this.

👍

IngelaAndin
IngelaAndin previously approved these changes Nov 14, 2024
@u3s u3s added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Nov 14, 2024
u3s added 4 commits November 15, 2024 14:24
- typo fix in system/doc/reference_manual/typespec.md rename
- ConnectionHandler to ConnectionRef to make docs less confusing
- add description summary(1st sentence) for ssh_connection:send/4
@u3s u3s force-pushed the kuba/ssh/doc_fixes/OTP-19335 branch from bd81f45 to d23db60 Compare November 15, 2024 13:26
@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Nov 15, 2024
@u3s u3s requested a review from IngelaAndin November 15, 2024 15:47
@u3s u3s merged commit 70288cd into erlang:maint Nov 15, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants