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

internaldocument.NewDocumentMarshaler not declared by package #342

Closed
jabalsad opened this issue Nov 16, 2021 · 9 comments
Closed

internaldocument.NewDocumentMarshaler not declared by package #342

jabalsad opened this issue Nov 16, 2021 · 9 comments

Comments

@jabalsad
Copy link

Hi,

I generated Go types from smithy models. One member shape uses the Document type. The generated code doesn't seem to compile:

In file: codegen/document/document.go:

func NewLazyDocument(v interface{}) Interface {
	return internaldocument.NewDocumentMarshaler(v)
}

I get an error: NewDocumentMarshaler not declared by package document

Any ideas?

@skmcgrail
Copy link
Member

The first thing that comes to mind is whether you are missing protocol generator implementation? For example are you trying to use the code generator for just generating the Go types, but not implementing any specific protocol serde?

@jabalsad
Copy link
Author

Yes, that might be it. I am just trying to generate the Go types from the smithy spec.

@aknuds1
Copy link
Contributor

aknuds1 commented Dec 7, 2021

I have the same problem after upgrading to smithy-go@main. @skmcgrail do you mean one has to go to specific steps to implement some protocol serde?

@aknuds1 aknuds1 mentioned this issue Dec 9, 2021
@jabalsad
Copy link
Author

@skmcgrail can you perhaps elaborate what it is we need to do here? thanks.

@aknuds1
Copy link
Contributor

aknuds1 commented Dec 10, 2021

I have understood a bit more by reverse engineering aws-sdk-go-v2, but I haven't got it working yet. Hopefully I'll reach a working solution, and can then share my findings.

@jabalsad
Copy link
Author

The first thing that comes to mind is whether you are missing protocol generator implementation? For example are you trying to use the code generator for just generating the Go types, but not implementing any specific protocol serde?

@skmcgrail I'm not exactly sure how to work around this issue. The only protocol we are declaring is:

@restJson1
service MyService { ... }

And yes - I'm simply trying to generate the Go types, which cannot compile due to the error.

@jabalsad
Copy link
Author

Update: we're also trying to use the go client, which contains no serializing/deserializing logic. Any advice here would be useful, thanks.

@jasdel
Copy link
Contributor

jasdel commented Feb 26, 2022

This most likely is related to #354 with smithy-go's lack of protocols.

@lucix-aws
Copy link
Contributor

#458

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

5 participants