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

feat(docs): Translate Aspect example to Go #2445

Merged
merged 3 commits into from
Jan 31, 2023
Merged

Conversation

ansgarm
Copy link
Member

@ansgarm ansgarm commented Dec 22, 2022

Note: This PR depends on #2439 (It is a separate PR because the example currently still fails due to some JSII error).

Running this example fails with:

panic: @jsii/kernel.SerializationError: Passed to parameter aspect of method cdktf.Aspects#add: Unable to deserialize value as cdktf.IAspect
├── 🛑 Failing value is an object
│      { Tags: [Object] }
╰── 🔍 Failure reason(s):
    ╰─ Value does not have the "$jsii.byref" key

which seems to be because we create a struct for our Aspect in Go (to store the tags to append) that is not available in the Nodejs side of things and hence causes an error.

Unfortunately there is no existing example from the AWS CDK that uses an Aspect in Golang. So I don't know whether this is even possible currently.

Related examples / issues I found:

@ansgarm
Copy link
Member Author

ansgarm commented Dec 22, 2022

Update: With the help of this Go testcase within JSII, I was able to stumble upon my error of passing the struct and not a pointer to the struct. Using that solved it (commit).

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants