-
Notifications
You must be signed in to change notification settings - Fork 454
Import error for Google Appengine packages #103
Comments
Speaking for myself, I don't really care to save any appengine packages in my Godeps/. Do you know if there is a way to tell godep to ignore certain packages? |
My understanding of appengine is that they provide two separate implementations of their packages for the SDK and the production system. Even if godep were to save appengine/..., it wouldn't work. If this is right, then we need some way to exclude appengine packages. It could be built in to godep as in matthewbelisle-wf@dba190f, or provided by the user as a flag, for example |
I am leaning toward an "ignore" or "omit" flag plus a default list of patterns to ignore that is just appengine. |
What about supporting a |
Was this ever implemented ? I've stumbled on this problem as well |
+1 |
@kr the -ignore flag, do you want it to be a comma separated list of import paths, or a regex? |
Omit appengine and appengine_internal by default, and adds a omit flag for other package patterns. Solves tools#103
Omit appengine and appengine_internal by default, and adds a omit flag for other package patterns. Solves tools#103
+1 on this. I'd be ok with CRLF delimited |
👍 |
1 similar comment
👍 |
@neurogeek you may be interested in this one? |
Sure, I'll take a look later today. |
I don't believe that this is necessary any longer as the legacy appengine packages were replaced by the ones that run on both appengine and managed appengine. See this and this for more information. I am currently using |
@kalbasit: Interesting. With new qualification over appengine packages, we definitely don't need this. |
@neurogeek What are the use cases for an |
@freeformz Sorry it took me a while to answer, rough past few weeks at work. I'll close this and if needed, people can issue a feature request. |
Sorry to "revive" this but the comment regarding appengine pacakges beign "replaced" is misleading, as the new packages are targeted to Managed VMs, and they provide a layer for compatibility that, once built with App Engine SDK (or with the build flag +appengine), will end up importing appengine/* imports as well. Given the fact that App Engine is now out of beta and the classic packages + SDK will follow the deprecation policies, I think this is a real issue. If you are working with App Engine and run godep save it will not work. I think that a solution like -omit is nice, but should be also recorded in Godep.json, so it would be recorded in the revision control and help other users working on the same repo/codebase to take advantage of that. |
👍 for |
Ok.. |
Thank you @neurogeek! We really appreciate it! 👍 |
Hey @neurogeek! Have you had the chance to look at this issue? Thanks |
@dsymonds I think the community is quite confused about the fate of the Appengine SDK versus the Appengine packages, can you please clarify? |
Ok, I took a look and also asked around and yes, Go on Appengine needs to be handled differently. The Appending SDK is the new-ish thing, but Appengine packages aren't going away anytime soon. |
They aren't "replacements" completely, though; any existing app using |
@neurogeek I'd rather not add -omit if we can help it. @dsymonds Does this mean that users should |
Currently, I'm using the Also, I just noted that if you run So, to sum up my experiences so far:
I'm just wondering if there is a better/recommended way to work with both tools, and avoid the confusion that I am having. If the only supported way is the new imports, then let it be - I would suggest that maybe it worth adding this to the documentation. The -omit flag may not solve the problem; maybe a special case for appengine/* would help everyone, even if transitivelly until the new packages are more widelly addopted. |
@freeformz: If the newer packages work for you, sure. They'll be the best supported ones in the long term. Switching to |
@dsymonds @ronoaldo For reference that README is here right? https://github.com/golang/appengine |
@freeformz @ronoaldo https://github.com/golang/appengine#2-update-import-paths
|
@dsymonds @freeformz @pshevtsov thanks. I am happy that the recommendation is then to move to the new packages, which hence are compatible with |
Awesome. I'm going to close this issue out again then as I think it documents what people should do. |
@freeformz but Thanks. |
@freeformz just found out the above error is pertaining to #348 |
Google Appengine is a common platform for Go apps, but godep can't save appengine packages because the appengine SDK shims its import paths instead of using normal VCS based import paths. So instead of
import "github.com/something/appengine/datastore"
it doesimport "appengine/datastore"
and then shims the imports somehow to point to the SDK paths for the package.https://github.com/GoogleCloudPlatform/appengine-guestbook-go/blob/32112ced8de3e8e02bd64801f99f776527c62f23/hello.go#L8
This is a problem because godep throws an error when it tries to import these,
which makes sense but is unfortunate. What is the proper way to fix that? This change here works but seems a little kludgy.
matthewbelisle-wf@dba190f
The text was updated successfully, but these errors were encountered: