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

Support disambiguating links with type signature information #643

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Jun 23, 2023

Bug/issue #, if applicable: rdar://112224233

Summary

Adds support for disambiguating symbol links with information from the symbol graph's functionSignature data.

This new syntax was pitched on the Swift Forums in this thread.

With these changes DocC will support type signature disambiguation in links and will use it in diagnostics but topic references and page URLs will continue to only use kind-and-hash disambiguation to ensure that all pages have the same URLs as without these changes.

Dependencies

None.

Testing

Describe how a reviewer can test the functionality of your PR. Provide test content to test with if
applicable.

Steps:

  1. Provide setup instructions.
  2. Explain in detail how the functionality can be tested.

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

I feel that the code in this PR is getting too long to be easily reviewed but splitting it into multiple files in the same PR makes it much much harder to know what changed and what moved. Because of this I opened #662 to only split the code into multiple files and then this PR can focus on just the new feature.

@d-ronnqvist d-ronnqvist force-pushed the readable-symbol-link-disambiguation branch from 0939305 to 4b2581b Compare December 1, 2023 15:45
@d-ronnqvist d-ronnqvist force-pushed the readable-symbol-link-disambiguation branch from 4b2581b to 7341760 Compare December 1, 2023 15:51
# Conflicts:
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift
#	Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift
@d-ronnqvist d-ronnqvist force-pushed the readable-symbol-link-disambiguation branch from 9605330 to 3827762 Compare December 14, 2023 14:52
@d-ronnqvist d-ronnqvist added the merge conflicts This pull request has merge conflicts that need to be resolved label Jan 29, 2024
@d-ronnqvist
Copy link
Contributor Author

I'm breaking this up into smaller pieces (#824 and #828) so that there won't be as many merge conflicts to deal with. I'll rebase this PR once both those have been merged.

# Conflicts:
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Serialization.swift
#	Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift
#	Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift
@d-ronnqvist d-ronnqvist removed the merge conflicts This pull request has merge conflicts that need to be resolved label Mar 4, 2024
@d-ronnqvist d-ronnqvist marked this pull request as ready for review March 4, 2024 17:04
@d-ronnqvist
Copy link
Contributor Author

The main implementation is ready for review. I will update the user facing documentation to describe this new syntax.

@d-ronnqvist d-ronnqvist changed the title Experimental support for disambiguating links with type signatures Support disambiguating links with type signature information Mar 4, 2024
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

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.

None yet

1 participant