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

go: missing setters for read-write properties #2665

Closed
1 of 5 tasks
iliapolo opened this issue Mar 9, 2021 · 1 comment · Fixed by #2731
Closed
1 of 5 tasks

go: missing setters for read-write properties #2665

iliapolo opened this issue Mar 9, 2021 · 1 comment · Fixed by #2731
Assignees
Labels
bug This issue is a bug. compliance Missing or broken compliance tests effort/small Small work item – less than a day of effort language/go Regarding GoLang bindings p1

Comments

@iliapolo
Copy link
Contributor

iliapolo commented Mar 9, 2021

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Golang

General Information

  • JSII Version: ALL
  • Platform: ALL

What is the problem?

Consider the following TS code:

export interface IInterfaceWithProperties {
  readonly readOnlyString: string;
  readWriteString: string;
}

The resulting generated Golang interface is:

type IInterfaceWithProperties interface {
  ReadOnlyString() string
  ReadWriteString() string
}

Notice it is missing a setter for the readWriteString property. Strangely enough, the implementation does actually exist:

func (i *iInterfaceWithProperties_jsiiProxy) SetReadWriteString(val string) {
	_jsii_.Set(
		i,
		"readWriteString",
		val,
	)
}

Verbose Log

@iliapolo iliapolo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. effort/medium Medium work item – a couple days of effort p1 compliance Missing or broken compliance tests language/go Regarding GoLang bindings and removed needs-triage This issue or PR still needs to be triaged. labels Mar 9, 2021
@MrArnoldPalmer MrArnoldPalmer added effort/small Small work item – less than a day of effort p2 p1 and removed effort/medium Medium work item – a couple days of effort p1 p2 labels Mar 11, 2021
@RomainMuller RomainMuller self-assigned this Mar 22, 2021
RomainMuller added a commit that referenced this issue Mar 22, 2021
Adding the missing code generation for interface properties that are
writable. Previously, only the reader was generated.

Fixes #2665
@mergify mergify bot closed this as completed in #2731 Mar 23, 2021
mergify bot pushed a commit that referenced this issue Mar 23, 2021
Adding the missing code generation for interface properties that are
writable. Previously, only the reader was generated.

Fixes #2665



---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. compliance Missing or broken compliance tests effort/small Small work item – less than a day of effort language/go Regarding GoLang bindings p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants