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

dart pub publish --dry-run does not warn about unchanged description #3537

Open
osaxma opened this issue Aug 24, 2022 · 2 comments
Open

dart pub publish --dry-run does not warn about unchanged description #3537

osaxma opened this issue Aug 24, 2022 · 2 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@osaxma
Copy link

osaxma commented Aug 24, 2022

Environment

  • Dart version: Dart SDK version: 2.17.6 (stable) (Tue Jul 12 12:54:37 2022 +0200) on "macos_x64

Problem

I've created a package using dart create -t package and I forgot to change the description. When I ran dart pub publish --dry-run , I got Package has 0 warnings.

Though when I tried to publish, I got the following error:

`description` contains a generic text fragment coming from package templates (`A starting point for Dart libraries or applications`).
Please follow the guides to describe your package:
https://dart.dev/tools/pub/pubspec#description

The description that caused the error in publishing:

description: A starting point for Dart libraries or applications.

Expected Behavior:

I expected to get a warning during the dry run.

@sigurdm
Copy link
Contributor

sigurdm commented Aug 25, 2022

Yeah --dry-run only does a subset of all checks.

This is in spirit a duplicate of #2996

For this specific check we could perhaps improve the user-experience by having the template text include a TODO, and have a lint in the analyzer to not include any TODO's in your description. (requires also: #3391)

We do not want to implement such specific warnings in the client (what if the template changes, then the client is outdated).

We might want to look into all the server-side checks again and see which of them could be reasonably duplicated either by the analyzer or the pub client.

Currently this is not a high priority as the harm from a failed publication attempt is very small even though annoying.

@sigurdm sigurdm added the type-enhancement A request for a change that isn't a bug label Aug 25, 2022
@osaxma
Copy link
Author

osaxma commented Aug 25, 2022

Thanks @sigurdm for your time.

And, Yeah I agree it's not a big deal or high priority. This would only occur in the first time the package is published and only if the description was not updated. I just thought it was worth reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants