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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links for types from dependencies #358

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

basile-henry
Copy link

The main thing this PR does is add links for types that are defined in dependencies.

The motivation is to be able to quickly navigate to related documentation that is directly relevant to a package's docs. It also helps to disambiguate what types a package uses, which is particularly useful for heavily overloaded type names such as Color (I can never figure out which one is intended 馃槄).

In order to do this we have to find out which version of a dependency to link to. While it might be tempting to link to the latest version, it could lead to broken links if the type is removed/changed in the latest version of the dependency. As such we instead link to the most recent version that matches the constraint associated with the dependency. In this PR I am calling this a ResolvedDep.

This PR does 2 extra things:

  • In the about section, link to the version from the ResolvedDep instead of latest if the dependency could be resolved.
  • Link to type aliases and not just type unions. I now realise this was also done in Add links to type aliases聽#353

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