racket / racket-pkg-website

A frontend for the Racket Package Catalog.
Other
9 stars 15 forks source link

Packages now display docs for packages which imply them. #61

Closed cfinegan closed 6 years ago

cfinegan commented 6 years ago

This pull request alters the behavior of the package summary table such that packages will display links to the docs of packages which imply them. For example, the package gui infers its docs from the package gui-doc, so on the live version of the package table gui and gui-doc will always display the same list of documentation links.

The package gui-lib, however, is not able to infer its relationship to the gui or gui-doc packages, so it still incorrectly complains that it needs documentation. With these changes, gui-lib will display the docs of gui, which gives us the desirable behavior of gui, gui-doc, and gui-lib all displaying the same set of documentation links.

As with my previous pull requests, I'm unable to test these changes locally, so this pull request is contains my best effort at "mentally debugging" the new feature. It would be a good idea to test this change in isolation before pushing to the live server.

jackfirth commented 6 years ago

I'm not sure this is correct. I have a package mock with docs that implies another package arguments because the arguments package is code I split out of mock when it became clear it could be its own module. The two packages are logically separate with separate documentation, with a small note in the mock docs that it reprovides the exports of the arguments collection for historical reasons. With this change, the mock package would include the documentation of arguments as part of its list of documents. I don't think that's desirable. There are a number of other packages similar to mine that would also have this problem.

In #58, a metapackage or subpackage-of field was proposed so that package authors may explicitly declare when a set of packages should be considered a single logical package. I think that's a more appropriate route to go down.

jeapostrophe commented 6 years ago

I agree with @jackfirth and I think we need to work out the best way to do it. In particular, once we have subpackage-of, then I think the display needs to be adjusted to only show the "meta" package (perhaps listing the component packages)

Sorry Conor. Also, you need to rebase your repository so your pull requests don't have the whole history, including stuff we already merged