Suggestion: track if your modules have been installed from pkg server

I often find myself wondering if the packages I've posted are in use by anyone. In part for the egoboo but also because if they aren't in use by anyone else then backwards compatibility isn't as important a consideration.

It's a thorny question, with issues about privacy etc. Some options would be:

  1. raco pkg install drops a tag for the username (privacy issue!)
  2. raco pkg install increments a number on the package server saying "this has been installed by N times" (or "...by N different instances"?)
  3. There could be a "raco pkg iuse" command that allows people to explicitly tell the package "I use "
  4. This is all silly and not worth spending time on. :>

Options 1 and 2 could be opt in or opt out, obviously.

This is something of an idle thought. Does anyone else have feelings about it?

3 Likes

Other ideas:

  • Package server could list all the packages it knows of that depend on your version. (Probably not simple to implement)
  • After raco pkg install mypackage, if mypackage is hosted on Github or Gitlab, prompt the user to open the GitHubLab page for the package and star the repo. This would miss all the dependencies of the package, probably acceptable. But this further entrenches Github as the only git host, which is not good.
1 Like

For the most part this info is likely to go stale very quickly even assuming you could feasibly collect it to begin with.

I think this really points to the fact that package versioning and dependencies in Racket are a little broken by default for most common use cases, as the recent memoize debacle illustrates. An end user can manage them properly by maintaining their own package catalogs, but almost no one does (including me). So the best package authors can do is document breaking changes and hope for no nasty messages after the push.

1 Like

You can already do this. You can copy the catalog locally using the command

raco pkg catalog-copy https://pkgs.racket-lang.org ./local-catalog

...and you have access to all the package metadata that the package server has access to. All the files are just serialized hash tables, so they can be read into a racket program using read to analyze the package information.

You can also simply use grep to search the code. For example to find out which packages use memoize as a dependency, you can run grep -l memoize * in the pkgs subfolder.

I understand that this is not as easy or as convenient as most users would like, but given there is a small number of volunteers in the Racket community, there is little chance of the situation to improve...

Alex.

6 Likes