Skip to content

Rename the tags() functions of Repository and of WorkingCheckout to getTags() #3100

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

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Dec 9, 2020

Rename the tags() functions of Repository and of WorkingCheckout to getTags(). Until recently this was a property called tags, but now that it’s a function it makes more sense to call it getTags().

Motivation:

This makes it more consistent with all the other functions, which have a verb at the start (including the getCurrentRevision() function), but more importantly this makes it easier for clients to adopt to the change (having a property change to a method without changing name makes it difficult for a type that adopts the protocol to conform to both).

Modifications:

Renamed the function in protocols and clients.

Result:

No change in functionality but more consistent naming and easier transition for clients.

… `getTags()`. This makes it more consistent with all the other functions, which have a verb at the start, but more importantly makes it easier for clients to adopt to the change (having a property change to a method without changing name makes it difficult for a type that adopts the protocol to conform to both).

No change in functionality.
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud requested review from tomerd and removed request for aciidgh December 9, 2020 07:06
@abertelrud abertelrud self-assigned this Dec 9, 2020
@tomerd tomerd merged commit 412218e into swiftlang:main Dec 9, 2020
federicobucchi pushed a commit to federicobucchi/swift-package-manager that referenced this pull request Jan 6, 2021
… `getTags()`. This makes it more consistent with all the other functions, which have a verb at the start, but more importantly makes it easier for clients to adopt to the change (having a property change to a method without changing name makes it difficult for a type that adopts the protocol to conform to both). (swiftlang#3100)

No change in functionality.
@abertelrud abertelrud deleted the suggested-rename-of-tags-property branch August 23, 2021 00:43
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.

2 participants