How to change package name on the package index?

43 views
Skip to first unread message

Siddhartha Kasivajhula

unread,
Jun 4, 2020, 10:23:36 PM6/4/20
to Racket Users
A little while ago I uploaded a package to the package index and entered a Titlecase name for it. I've since learned that this becomes the identifier for the package that will be used by raco from that point on (as opposed to being used only on the package description page, as I assumed then). I'd like to change this to be a lowercase name since (1) that corresponds to the collection name, (2) using the lowercase name in raco, or to indicate it as a dependency in info.rkt, currently results in the package not being found, and (3) during local development, the package is hosted at a local directory with a lowercase name, per UNIX convention, making local raco interaction awkward (the info.rkt dependency needs to be titlecase on origin, but lowercase locally).

Is there a way to change the name on the package index? "Editing" the package and changing the name to lowercase doesn't work ("Save failed"). As far as I can tell I should be able to delete the package and re-create it under the lowercase name, but I'd prefer to avoid that since (1) it would lose the package metadata and (2) it could be off the package index for up to a day (the package index refresh cycle) during which time other packages depending on it would be broken (I realize they may break anyway if I change the name, but at least I'd be able to fix dependencies I control immediately, and I'm not sure anyone else is using this package directly anyway).

Aside from my particular conundrum, I'm wondering why package names are case sensitive to begin with, and if it might mitigate confusion if they were case insensitive.

Any suggestions or thoughts? Thanks,

Alexis King

unread,
Jun 4, 2020, 10:41:20 PM6/4/20
to Siddhartha Kasivajhula, Racket Users
On Jun 4, 2020, at 21:23, Siddhartha Kasivajhula <skas...@gmail.com> wrote:

I'd prefer to avoid that since (1) it would lose the package metadata and (2) it could be off the package index for up to a day (the package index refresh cycle) during which time other packages depending on it would be broken

This isn’t quite right: it’s true that the pkg-build service only runs once every 24 hours, but the only thing that depends on that is built documentation. The actual package index is refreshed much more rapidly—on the order of minutes. You wouldn’t have to wait very long at all to update other packages.

But even if you did, it wouldn’t matter, because there’s an easier solution: add your package under the new name before you delete the old name. Then you can delete the old name once you’ve ensured that everything you care about is updated. It’s perhaps a bit strange to have the same package simultaneously indexed under two different names, but it shouldn’t cause any trouble.

Alexis

Siddhartha Kasivajhula

unread,
Jun 4, 2020, 11:33:09 PM6/4/20
to Alexis King, Racket Users
OK, that's a good idea. I guess that still means it would lose the metadata, correct? That seems less than ideal, but I suppose it's more of an aesthetic concern.

Re: the broader case-sensitivity consideration, for anyone interested in additional context, it looks like the python package index is case insensitive, while Ruby gems are case sensitive, although it looks like capital letters are now disallowed following discussions including this one.

Siddhartha Kasivajhula

unread,
Jun 4, 2020, 11:59:03 PM6/4/20
to Alexis King, Racket Users
@Alexis King , let's say I add the new package with the lowercase name but other metadata identical to the old one, including the github repo and the collection name. I would then update everything I care about to use the new package and then wait for a day or two for the docs to show up. At that point, how would the documentation server handle the fact that two packages provide identical top-level collections? Would that be OK? Not sure if it matters that this is a top-level collection name.



Tony Garnock-Jones

unread,
Jun 5, 2020, 3:41:12 AM6/5/20
to Racket Users
I think the package name system is case-insensitive (??) but case-preserving (definitely), and certainly objects to trying to create two packages that differ only in case.

So renaming from FOO to foo won't work, because it considers this an attempt to overwrite an existing package. I think. We could probably change that?

But here's a trick: try renaming FOO to FOO-x, and then to foo. That might work.


On Friday, June 5, 2020 at 5:59:03 AM UTC+2, Siddhartha Kasivajhula wrote:
...@Alexis King , let's say I add the new package with the lowercase name but other metadata identical to the old one, including the github repo and the collection name. I would then update everything I care about to use the new package and then wait for a day or two for the docs to show up. At that point, how would the documentation server handle the fact that two packages provide identical top-level collections? Would that be OK? Not sure if it matters that this is a top-level collection name.



Siddhartha Kasivajhula

unread,
Jun 5, 2020, 7:37:10 PM6/5/20
to Tony Garnock-Jones, Racket Users
I'm pleased to report that the "rename swap" of Originalname -> Originalname-x -> originalname worked like a charm :) It also preserved the metadata. Also, the dependent packages built successfully within about an hour of the upstream rename. Thank you both for your suggestions and input.

If anyone has been using the "Relation" package, please use "relation" from now on.

I've reported this issue here.




--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/7a1060e0-40ff-44d2-b432-8aa883e676a5o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages