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

Unclear error when package contains no entrypoints #49

Closed
nex3 opened this issue Mar 22, 2016 · 4 comments
Closed

Unclear error when package contains no entrypoints #49

nex3 opened this issue Mar 22, 2016 · 4 comments

Comments

@nex3
Copy link
Member

nex3 commented Mar 22, 2016

From @maxwellpeterson-wf on March 22, 2016 17:55

If you try to publish a package that does not have any .dart files in lib/, the following happens:

Uploading... (5.1s)
Bad state: The transaction has already been committed..

This happens because the libraries property on the PackageVersion entity does not get set, so the commit actually fails.

Error while committing: ApplicationError: Property "libraries" has no value., #0      _validateResponse.<anonymous closure> (package:googleapis_beta/src/common_internal.dart:880:11)

It would be great if there was a more clear error presented when this happens :)

Copied from original issue: dart-lang/pub#1398

@maxwellpeterson-wf
Copy link

This looks like more of an issue with the datastore API: googleapis/google-cloud-datastore#41

@mkustermann
Copy link
Member

@maxwellpeterson-wf Are you using the pub-dartlang-dart app for running your own pub server (and use the package:gcloud/src/datastore_impl.dart implementation)?

If so, I could imagine that this is in fact googleapis/google-cloud-datastore#41. Our deployed version of the pub-dartlang-dart app is using the native protobuf APIs which AppEngine provides (provided by package:appengine) and I think we can commit a PackageVersion with no libraries.

@maxwellpeterson-wf
Copy link

Yes, we have it deployed to a GCE instance for now so that we can firewall it off to our office IPs and VPN. Once OAuth2 support is added for pub get we will go back to an AppEngine deployment. Good to know that it won't be an issue then.

I did end up changing the encodeValue method of the CompatibleListProperty on our fork to return null instead of [] here, and that allows us to publish with no libraries.

mkustermann added a commit that referenced this issue Mar 31, 2016
@isoos
Copy link
Collaborator

isoos commented Apr 13, 2017

I believe this issue can be closed. I've tried to upload an empty package (no lib/ directory, only bin/), and it works just fine.

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

No branches or pull requests

4 participants