-
Notifications
You must be signed in to change notification settings - Fork 229
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
pub publish --dry-run not surfacing all package errors #2828
Comments
This seems like the same issue as: #2743, just with a different validation failing. |
The issue is that these checks happen on the server. Some checks could have a duplicate implementation in the client - but for some checks they might be specific to our server (another server might have less strict license requirements). Also checks that happen in the client are there in that version of the sdk forever - while those on the server are easy to change moving forward. Maybe we should have dry-run do a validating upload to the server... not sure - we would probably need another api end-point for that. |
Maybe having a separate package for the validations would be the best here. It could be a dev or global dependency that CI runs, and while we may tie it to an SDK via the |
Just ran into this myself while updating https://pub.dev/packages/rebloc. Looks like you're all over it, but here's my versions just in case:
|
We can totally add a validation for:
We didn't do this client side initially because we wanted to have to ability back it out quickly if it caused problems for anyone. Implementing it client side is no big deal, it only affects plugin authors who are cleaning up old plugins with |
No, server side checks like this cannot be surfaced client side. It's mostly when we do things out-of-band that doing them serverside first is a good idea. Or if we do checks we might want to revert. Regarding this specific check, it:
I'm not sure it's worth the effort to implement this validation two places. Please reopen if I'm missing a good reason. It's not ideal to first get errors when publishing, but number of users affected by this seems relatively small. |
I don't disagree with the overall issue:
And when we see other issues I'm happy to add more validators to |
Environment
pub version
orflutter pub version
: Pub 2.12.0-214.0.devProblem
We're attempting to publish this Plugin:
However when I do
pub publish
on it, I get the following error:That's fine, and the error text is helpful (and I have a PR addressing the issue), however if I run
pub publish -n
in the same package:We use
pub publish -n
as a CI verification step for incoming pull requests to flutter/plugins. Is there anything else we need to do to get those server-side errors surfaced as well? We allowed a merge that is not "publishable" (and we'd like to avoid that).Expected behavior
I would expect
pub publish --dry-run
to surface the same errors thatpub publish
eventually spits.Actual behavior
pub publish --dry-run
seems to only run a subset of the validations thatpub publish
does.The text was updated successfully, but these errors were encountered: