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

chore: Move signals parameter names to annotation #750

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

piiertho
Copy link
Member

This moves signal parameter names to annotations.

@piiertho piiertho requested review from chippmann and CedNaru January 15, 2025 08:05
@piiertho piiertho self-assigned this Jan 15, 2025
@piiertho piiertho force-pushed the chore/move-signal-parameter-names-to-annotation branch from 211fdad to 5fb0c6a Compare January 16, 2025 19:08
Copy link
Contributor

@chippmann chippmann left a comment

Choose a reason for hiding this comment

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

I'd also change

val argumentName = registeredSignal.parameterNames.getOrNull(index) ?: "name_no_provided"
the default name with this change to be p0 p1 and so on based on the param index. Previously this fallback was almost impossible to reach because of the argument type safety. But now it's much easier to get into this case as there are no static type checks anymore.

so possible arg name conflicts are much more likely to occure

@CedNaru CedNaru self-requested a review January 21, 2025 16:43
Copy link
Member

@CedNaru CedNaru left a comment

Choose a reason for hiding this comment

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

You have to update the documentation.

@piiertho
Copy link
Member Author

piiertho commented Feb 2, 2025

I'd also change

val argumentName = registeredSignal.parameterNames.getOrNull(index) ?: "name_no_provided"

the default name with this change to be p0 p1 and so on based on the param index. Previously this fallback was almost impossible to reach because of the argument type safety. But now it's much easier to get into this case as there are no static type checks anymore.
so possible arg name conflicts are much more likely to occure

done !

@piiertho piiertho requested review from CedNaru and chippmann February 2, 2025 16:23
@piiertho piiertho force-pushed the chore/move-signal-parameter-names-to-annotation branch from 59a2d1e to 629bbf8 Compare February 2, 2025 16:25
CedNaru
CedNaru previously approved these changes Feb 2, 2025
@piiertho piiertho force-pushed the chore/move-signal-parameter-names-to-annotation branch from 629bbf8 to 5145525 Compare February 5, 2025 08:49
@piiertho piiertho requested a review from CedNaru February 5, 2025 08:49
@piiertho piiertho merged commit fcecb9f into master Feb 5, 2025
57 checks passed
@piiertho piiertho deleted the chore/move-signal-parameter-names-to-annotation branch February 5, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants