Ticket #576 (new enhancement)

Opened 3 years ago

Last modified 7 weeks ago

Show reverse dependencies

Reported by: Lenny222 Owned by:
Priority: normal Milestone: HackageDB
Component: hackageDB website Version: 1.6.0.1
Severity: normal Keywords: dependencies
Cc: valery.vv@…, alfonso.acosta@…, v.dijk.bas@…, kfrdbs@…, anton.nik@…, pho@… Difficulty: easy (<4 hours)
GHC Version: Platform:

Description (last modified by vvv) (diff)

Suggestion: for every package show which other packages (if any) depend on it.

Why?

Many packages on  http://hackage.haskell.org/ do not provide examples or documentation. It could be very helpful to look at packages which use the package on is interested in.

This can be made easier if every package on  http://hackage.haskell.org/ displays which other packages depend on it.

Attachments

reverse_dependencies.patch Download (49.1 KB) - added by Roel van Dijk 2 years ago.
Implements reverse dependencies

Change History

Changed 3 years ago by ross

As a workaround, you can get an approximation of this by typing the package name in the search box on the Packages page.

Changed 3 years ago by explicitcall

 http://hackage.haskell.org/package/cabal-query

As a workaround, you can use this library directly, to query all packages which have specified package in depends field.

Changed 2 years ago by Roel van Dijk

Implements reverse dependencies

Changed 2 years ago by Roel van Dijk

A description of what my patch adds to hackage:

An executable called pkg-rev-deps calculates the reverse dependencies of every package. It writes this information to a file called "revdeps.csv" inside the directory of a package.

The package CGI script is modified to read this file. It will display the number of reverse dependencies right after the normal dependencies. The number of reverse dependencies is a link which will take you to a page containing a listing of all the reverse dependencies, direct and indirect. This page is rendered by a new CGI script called "revdeps".

If you do not run pkg-rev-deps to generate the revdeps.csv files then package and revdeps will simply claim that there are no reverse dependencies.

I have NOT added pkg-rev-deps to the post-upload-hook script, because I can't judge if the additional overhead will be to large. On my system pkg-rev-deps takes about 4.5 times as long as pkg-list to complete its run. About 60% of this time is spent parsing all the package descriptions. Memory usage is fairly low: around 10MB.

New files:

  • RevDepMap.hs -- calculates reverse dependencies
  • pkg-rev-deps.hs -- generates revdeps.csv files
  • revdeps.hs -- CGI script that lists reverse dependencies
  • RevDepsPage.hs -- implementation of the revdeps script

Utils now contains a function to load the revdeps.csv file and some functions to calculate revdep related URLs. I also updated the .cabal and Makefile.

I don't know if pkg-rev-deps should be added to the post-upload-hook. It already takes some time to upload a package. Perhaps it can be run in a cron-job 4 times a day.

Some feedback would be really appreciated. I think that this is a feature which will really add some value to hackage. It can help you when deciding which package to use for you next project. It is also useful for developers as you get an idea how your package is being used.

Changed 2 years ago by vvv

  • cc valery.vv@… added
  • description modified (diff)

Changed 2 years ago by fons

  • cc alfonso.acosta@… added

Changed 23 months ago by basvandijk

  • cc v.dijk.bas@… added

The following is a link to our server which has a version of hackage-scripts installed which has the reverse_dependencies.patch installed:

 http://bifunctor.homelinux.net/~roel/hackage/packages/hackage.html

(Note that this server is synced daily with hackage)

Changed 21 months ago by kfrdbs

  • cc kfrdbs@… added

Changed 8 months ago by lelf

  • cc anton.nik@… added

Changed 3 months ago by PHO

  • cc pho@… added

Changed 7 weeks ago by elga

Changed 7 weeks ago by edouard

le numero Rio, ou numero de Releve d'Identite Operateur, est un numero a 12 caracteres fourni par son operateur de telephonie mobile vous permettant de conserver son numero de telephone lorsque vous changez d'operateur.  rio bouygues

Note: See TracTickets for help on using tickets.