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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to check if package name is available #8390

Open
JHubi1 opened this issue Dec 10, 2024 · 4 comments
Open

Way to check if package name is available #8390

JHubi1 opened this issue Dec 10, 2024 · 4 comments

Comments

@JHubi1
Copy link

JHubi1 commented Dec 10, 2024

Already happened a few times that I found a name that seemingly is free, so showing a 404 on pubdev. I develop my package, polish it, get it ready for shipment. But when I try publishing, pubdev blocks it, because another package with a similar name already exists.

How am I supposed to know? "Rebranding" a package is not always easy. It would be very good if there was a way of checking avaliability. A small message on the 404 that reads along the lines of "did you mean xyz", or something integrated into the CLI, as described in dart-lang/pub#3966

@sigurdm sigurdm transferred this issue from dart-lang/pub Dec 10, 2024
@isoos
Copy link
Collaborator

isoos commented Dec 10, 2024

@JHubi1: could you please give us some example names that were in conflict with the existing ones?

@sigurdm
Copy link
Contributor

sigurdm commented Dec 10, 2024

I guess one problem is our "similarity detection". So https://pub.dev/packages/retrys is 404, but you cannot publish it anyways.

Also our moderated/deleted packages packages result in 404, but we have tombstones that block publishing

@JHubi1
Copy link
Author

JHubi1 commented Dec 10, 2024

Exactly, plurals or underscores block the package name with no effective way of knowing whether the name would work or not, until you try publishing

I encouraged this with my licenses_dart package. Originally wanted to publish to licenses, but couldn't because of license.

I'm not complaining about the existence of the system, but there not being a way to check beforehand is problematic

@isoos
Copy link
Collaborator

isoos commented Dec 12, 2024

We could probably have a simple form that checks if the package name is available. As this is a server-side check specific to pub.dev (and may be absent on private or third-party servers), the pub client wouldn't know about it up until the actual publish attempt is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants