Skip to content

change DynamicSupervisor doc to avoid confusions #13678

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

Merged

Conversation

JoeZ99
Copy link
Contributor

@JoeZ99 JoeZ99 commented Jun 19, 2024

Clearly distinguishes between an init option provided as initial argument to DynamicSupervisor, and a regular "GenServer type" option provided as third argument in start_link/3

fix #13675

@JoeZ99
Copy link
Contributor Author

JoeZ99 commented Jun 19, 2024

@josevalim , I removed the suggested change of writing @spec xxx(GenServer.option()) instead of @spec xxx(GenServer.option), because I suspect that's what's making format fails ...

@josevalim
Copy link
Member

Parenthesis are required on both, that should fix it. CI should show the difference too!

@josevalim josevalim merged commit bb902bc into elixir-lang:main Jul 2, 2024
9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Comment on lines -218 to -219
@typedoc "Options given to `start_link` functions"
@type option :: GenServer.option()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now-removed type was being used at https://github.com/elixir-lang/elixir/blob/main/lib/elixir/lib/task/supervisor.ex#L77C1-L77C37 which now needs to be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and thanks:
#13704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

DynamicSupervisor: the option "max_restarts" only work if provided as initial argument
3 participants