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

Add a suffix property to LinkCompletionTools.ParsedDisambiguation #1151

Merged

Conversation

d-ronnqvist
Copy link
Contributor

Bug/issue #, if applicable:

Summary

This adds a suffix String property to LinkCompletionTools.ParsedDisambiguation.

Originally I had thought that this wouldn't be necessary and that the caller could get the disambiguation suffix substring from the original link string (by dropping the name) but the caller doesn't know the ranges of each individual path component substring and would need to re-implement their own parsing.

Dependencies

None.

Testing

Call the new API. It should behave like the examples in the added tests.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor Author

I decided to land the bug fix separately so that it can be cherry-picked into the 6.1 release as well.

I'll mark this a draft until #1152 is merged.

@d-ronnqvist d-ronnqvist marked this pull request as draft January 29, 2025 13:48
@d-ronnqvist d-ronnqvist marked this pull request as ready for review January 29, 2025 16:44
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@mayaepps mayaepps left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@d-ronnqvist d-ronnqvist merged commit 5a9d30c into swiftlang:main Feb 10, 2025
2 checks passed
@d-ronnqvist d-ronnqvist deleted the link-completion-spi-suffix-string branch February 10, 2025 08:58
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